pub fn preprocess(&self, scene: &Scene) {
        let mut world_center_ref = self.world_center.write().unwrap();
        let mut world_radius_ref = self.world_radius.write().unwrap();
        Bounds3f::bounding_sphere(
            &scene.world_bound(),
            &mut world_center_ref,
            &mut world_radius_ref,
        );
    }
/// Some of the **DistanceLight** methods need to know the bounds
/// of the scene. Because lights are created before the scene
/// geometry, these bounds aren't available when the
/// **DistanceLight** constructor runs. Therefore,
/// **DistanceLight** implements the optional *preprocess()*
/// method to get the bound. This method is called at the end of
/// the **Scene** constructor.
Some of the **DistanceLight** methods need to know the bounds
of the scene. Because lights are created before the scene
geometry, these bounds aren't available when the
DistanceLight** constructor runs. Therefore,
DistanceLight** implements the optional *preprocess()
method to get the bound. This method is called at the end of
the **Scene** constructor.
Some of the ** DistanceLight ** methods need to know the bounds of the scene . Because lights are created before the scene geometry these bounds aren ' t available when the DistanceLight ** constructor runs . Therefore DistanceLight ** implements the optional * preprocess () method to get the bound . This method is called at the end of the ** Scene ** constructor .
pub fn preprocess(&self, scene: &Scene) {
        let mut world_center_ref = self.world_center.write().unwrap();
        let mut world_radius_ref = self.world_radius.write().unwrap();
        Bounds3f::bounding_sphere(
            &scene.world_bound(),
            &mut world_center_ref,
            &mut world_radius_ref,
        );
    }
pub fn preprocess ( & self , scene : & Scene ) { let mut world_center_ref = self . world_center . write ( ) . unwrap ( ) ; let mut world_radius_ref = self . world_radius . write ( ) . unwrap ( ) ; Bounds3f :: bounding_sphere ( & scene . world_bound ( ) , & mut world_center_ref , & mut world_radius_ref , ) ; }
Some of the **DistanceLight** methods need to know the bounds
of the scene.
Some of the ** DistanceLight ** methods need to know the bounds of the scene .
&self
scene
&Scene