pub fn make_fenestrations(
        list: &[Rc<Fenestration>],
        state: &mut SimulationStateHeader,
        n_rays: usize,
    ) -> Vec<SolarSurface> {
        list.iter()
            .enumerate()
            .map(|(i, s)| {
                let i = state.push(
                    SimulationStateElement::FenestrationFrontSolarIrradiance(i),
                    0.0,
                );
                s.set_front_incident_solar_irradiance_index(i);

                let i = state.push(
                    SimulationStateElement::FenestrationBackSolarIrradiance(i),
                    0.0,
                );
                s.set_back_incident_solar_irradiance_index(i);

                let i = state.push(
                    SimulationStateElement::FenestrationFrontIRIrradiance(i),
                    0.0,
                );
                s.set_front_ir_irradiance_index(i);

                let i = state.push(SimulationStateElement::FenestrationBackIRIrradiance(i), 0.0);
                s.set_back_ir_irradiance_index(i);
                // Create
                SolarSurface::new(n_rays, &s.vertices)
            })
            .collect()
    }
/// Builds a set of SolarSurfaces from Fenestrations
///
/// Adds the necessary elements to the `SimulationStateHeader`
Builds a set of SolarSurfaces from Fenestrations
Adds the necessary elements to the `SimulationStateHeader`
Builds a set of SolarSurfaces from Fenestrations Adds the necessary elements to the ` SimulationStateHeader `
pub fn make_fenestrations(
        list: &[Rc<Fenestration>],
        state: &mut SimulationStateHeader,
        n_rays: usize,
    ) -> Vec<SolarSurface> {
        list.iter()
            .enumerate()
            .map(|(i, s)| {
                let i = state.push(
                    SimulationStateElement::FenestrationFrontSolarIrradiance(i),
                    0.0,
                );
                s.set_front_incident_solar_irradiance_index(i);
                let i = state.push(
                    SimulationStateElement::FenestrationBackSolarIrradiance(i),
                    0.0,
                );
                s.set_back_incident_solar_irradiance_index(i);
                let i = state.push(
                    SimulationStateElement::FenestrationFrontIRIrradiance(i),
                    0.0,
                );
                s.set_front_ir_irradiance_index(i);
                let i = state.push(SimulationStateElement::FenestrationBackIRIrradiance(i), 0.0);
                s.set_back_ir_irradiance_index(i);
                // Create
                SolarSurface::new(n_rays, &s.vertices)
            })
            .collect()
    }
pub fn make_fenestrations ( list : & [ Rc < Fenestration > ] , state : & mut SimulationStateHeader , n_rays : usize , ) -> Vec < SolarSurface > { list . iter ( ) . enumerate ( ) . map ( | ( i , s ) | { let i = state . push ( SimulationStateElement :: FenestrationFrontSolarIrradiance ( i ) , 0.0 , ) ; s . set_front_incident_solar_irradiance_index ( i ) ; let i = state . push ( SimulationStateElement :: FenestrationBackSolarIrradiance ( i ) , 0.0 , ) ; s . set_back_incident_solar_irradiance_index ( i ) ; let i = state . push ( SimulationStateElement :: FenestrationFrontIRIrradiance ( i ) , 0.0 , ) ; s . set_front_ir_irradiance_index ( i ) ; let i = state . push ( SimulationStateElement :: FenestrationBackIRIrradiance ( i ) , 0.0 ) ; s . set_back_ir_irradiance_index ( i ) ; // Create SolarSurface :: new ( n_rays , & s . vertices ) } ) . collect ( ) }
Builds a set of SolarSurfaces from Fenestrations
Adds the necessary elements to the `SimulationStateHeader`
Builds a set of SolarSurfaces from Fenestrations Adds the necessary elements to the ` SimulationStateHeader `
list
&[Rc<Fenestration>]
state
&mut SimulationStateHeader
n_rays
usize
list
&[Rc<Fenestration>]
state
&mut SimulationStateHeader
n_rays
usize