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

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

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

                let i = state.push(SimulationStateElement::SurfaceBackIRIrradiance(i), 0.0);
                s.set_back_ir_irradiance_index(i);

                // create
                SolarSurface::new(n_rays, &s.vertices)
            })
            .collect()
    }
/// Builds a set of SolarSurfaces from Surfaces
///
/// Adds the necessary elements to the `SimulationStateHeader
Builds a set of SolarSurfaces from Surfaces
Adds the necessary elements to the `SimulationStateHeader
Builds a set of SolarSurfaces from Surfaces Adds the necessary elements to the ` SimulationStateHeader
pub fn make_surfaces(
        list: &[Rc<Surface>],
        state: &mut SimulationStateHeader,
        n_rays: usize,
    ) -> Vec<SolarSurface> {
        list.iter()
            .enumerate()
            .map(|(i, s)| {
                let i = state.push(SimulationStateElement::SurfaceFrontSolarIrradiance(i), 0.0);
                s.set_front_incident_solar_irradiance_index(i);
                let i = state.push(SimulationStateElement::SurfaceBackSolarIrradiance(i), 0.0);
                s.set_back_incident_solar_irradiance_index(i);
                let i = state.push(SimulationStateElement::SurfaceFrontIRIrradiance(i), 0.0);
                s.set_front_ir_irradiance_index(i);
                let i = state.push(SimulationStateElement::SurfaceBackIRIrradiance(i), 0.0);
                s.set_back_ir_irradiance_index(i);
                // create
                SolarSurface::new(n_rays, &s.vertices)
            })
            .collect()
    }
pub fn make_surfaces ( list : & [ Rc < Surface > ] , state : & mut SimulationStateHeader , n_rays : usize , ) -> Vec < SolarSurface > { list . iter ( ) . enumerate ( ) . map ( | ( i , s ) | { let i = state . push ( SimulationStateElement :: SurfaceFrontSolarIrradiance ( i ) , 0.0 ) ; s . set_front_incident_solar_irradiance_index ( i ) ; let i = state . push ( SimulationStateElement :: SurfaceBackSolarIrradiance ( i ) , 0.0 ) ; s . set_back_incident_solar_irradiance_index ( i ) ; let i = state . push ( SimulationStateElement :: SurfaceFrontIRIrradiance ( i ) , 0.0 ) ; s . set_front_ir_irradiance_index ( i ) ; let i = state . push ( SimulationStateElement :: SurfaceBackIRIrradiance ( i ) , 0.0 ) ; s . set_back_ir_irradiance_index ( i ) ; // create SolarSurface :: new ( n_rays , & s . vertices ) } ) . collect ( ) }
Builds a set of SolarSurfaces from Surfaces
Adds the necessary elements to the `SimulationStateHeader
Builds a set of SolarSurfaces from Surfaces Adds the necessary elements to the ` SimulationStateHeader
list
&[Rc<Surface>]
state
&mut SimulationStateHeader
n_rays
usize
list
&[Rc<Surface>]
state
&mut SimulationStateHeader
n_rays
usize