pub fn check_visible_direction(&self, origin: Vec3, direction: Vec3) -> bool {
        let mut position = origin;
        for _ in 0..MAX_ITERATIONS {
            let dist_to_geometry = self.signed_distance(position);
            if dist_to_geometry < EPSILON {
                return false;
            }
            if dist_to_geometry > MAX_DISTANCE {
                return true;
            }

            position += dist_to_geometry * direction;
        }
        return true;
    }
/// Check if a point can see to infinity in a certain direction
Check if a point can see to infinity in a certain direction
Check if a point can see to infinity in a certain direction
pub fn check_visible_direction(&self, origin: Vec3, direction: Vec3) -> bool {
        let mut position = origin;
        for _ in 0..MAX_ITERATIONS {
            let dist_to_geometry = self.signed_distance(position);
            if dist_to_geometry < EPSILON {
                return false;
            }
            if dist_to_geometry > MAX_DISTANCE {
                return true;
            }
            position += dist_to_geometry * direction;
        }
        return true;
    }
pub fn check_visible_direction ( & self , origin : Vec3 , direction : Vec3 ) -> bool { let mut position = origin ; for _ in 0 .. MAX_ITERATIONS { let dist_to_geometry = self . signed_distance ( position ) ; if dist_to_geometry < EPSILON { return false ; } if dist_to_geometry > MAX_DISTANCE { return true ; } position += dist_to_geometry * direction ; } return true ; }
Check if a point can see to infinity in a certain direction
Check if a point can see to infinity in a certain direction
&self
origin
Vec3
direction
Vec3
&self
origin
Vec3
direction
Vec3