pub fn normal(&self, point: Vec3) -> Vec3 {
        let distance_x: f32 = self.signed_distance(point + Vec3::new(EPSILON, 0.0, 0.0));
        let distance_y: f32 = self.signed_distance(point + Vec3::new(0.0, EPSILON, 0.0));
        let distance_z: f32 = self.signed_distance(point + Vec3::new(0.0, 0.0, EPSILON));
        ((Vec3::new(distance_x, distance_y, distance_z) - point) / EPSILON).normalized()
    }
/// Normal vector from a point near the surface described by the signed distance function.
Normal vector from a point near the surface described by the signed distance function.
Normal vector from a point near the surface described by the signed distance function .
pub fn normal(&self, point: Vec3) -> Vec3 {
        let distance_x: f32 = self.signed_distance(point + Vec3::new(EPSILON, 0.0, 0.0));
        let distance_y: f32 = self.signed_distance(point + Vec3::new(0.0, EPSILON, 0.0));
        let distance_z: f32 = self.signed_distance(point + Vec3::new(0.0, 0.0, EPSILON));
        ((Vec3::new(distance_x, distance_y, distance_z) - point) / EPSILON).normalized()
    }
pub fn normal ( & self , point : Vec3 ) -> Vec3 { let distance_x : f32 = self . signed_distance ( point + Vec3 :: new ( EPSILON , 0.0 , 0.0 ) ) ; let distance_y : f32 = self . signed_distance ( point + Vec3 :: new ( 0.0 , EPSILON , 0.0 ) ) ; let distance_z : f32 = self . signed_distance ( point + Vec3 :: new ( 0.0 , 0.0 , EPSILON ) ) ; ( ( Vec3 :: new ( distance_x , distance_y , distance_z ) - point ) / EPSILON ) . normalized ( ) }
Normal vector from a point near the surface described by the signed distance function.
Normal vector from a point near the surface described by the signed distance function .
&self
point
Vec3
&self
point
Vec3