pub fn scale_to(&mut self, max_distance: f32) {
        if let Some(ref extent) = self.extent {
            let distance = extent.distance();
            let max = distance.x.max(distance.y).max(distance.z);
            let scale = max_distance / max;
            self.transform.get_or_insert_with(Transform::default).scale =
                Vector3::from_value(scale);
        }
    }
/// Scale the scene to a specific max size
Scale the scene to a specific max size
Scale the scene to a specific max size
pub fn scale_to(&mut self, max_distance: f32) {
        if let Some(ref extent) = self.extent {
            let distance = extent.distance();
            let max = distance.x.max(distance.y).max(distance.z);
            let scale = max_distance / max;
            self.transform.get_or_insert_with(Transform::default).scale =
                Vector3::from_value(scale);
        }
    }
pub fn scale_to ( & mut self , max_distance : f32 ) { if let Some ( ref extent ) = self . extent { let distance = extent . distance ( ) ; let max = distance . x . max ( distance . y ) . max ( distance . z ) ; let scale = max_distance / max ; self . transform . get_or_insert_with ( Transform :: default ) . scale = Vector3 :: from_value ( scale ) ; } }
Scale the scene to a specific max size
Scale the scene to a specific max size
&mut self
max_distance
f32
&mut self
max_distance
f32