pub struct FrustumCuller<S> { /* private fields */ }Implementations§
Source§impl<S: BaseFloat> FrustumCuller<S>
impl<S: BaseFloat> FrustumCuller<S>
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates an identity frustum culler. This is equivalent to calling the from_matrix method
passing an identity matrix.
Sourcepub fn from_perspective(perspective: Perspective<S>) -> Self
pub fn from_perspective(perspective: Perspective<S>) -> Self
Creates a frustum culler from a given perspective frustum configuration.
Sourcepub fn from_perspective_fov(perspective: PerspectiveFov<S>) -> Self
pub fn from_perspective_fov(perspective: PerspectiveFov<S>) -> Self
Creates a frustum culler from a given PerspectiveFov configuration.
pub fn from_ortho(ortho: Ortho<S>) -> Self
Sourcepub fn from_matrix(m: Matrix4<S>) -> Self
pub fn from_matrix(m: Matrix4<S>) -> Self
Creates a FrustumCuller from an arbitrary matrix, from which the frustum planes are
computed.
Sourcepub fn test_point(&self, point: Vector3<S>) -> Intersection
pub fn test_point(&self, point: Vector3<S>) -> Intersection
Test wether a 3D point lies inside of the frustum
Sourcepub fn test_sphere<T>(&self, sphere: T) -> Intersection
pub fn test_sphere<T>(&self, sphere: T) -> Intersection
Returns the result of testing the intersection of the frustum with a sphere, defined by a
center point (center) and a radius (radius).
This method will distinguish between a partial intersection and a total intersection.
Sourcepub fn test_bounding_box<T>(&self, aab: T) -> Intersectionwhere
T: Into<BoundingBox<S>>,
pub fn test_bounding_box<T>(&self, aab: T) -> Intersectionwhere
T: Into<BoundingBox<S>>,
Tests wether a given axis aligned bounding box intersects with the Frustum. There is a
distinction between partial intersection and full intersection, which is given by the
values of the Intersection enum.
Trait Implementations§
Source§impl<S: Clone> Clone for FrustumCuller<S>
impl<S: Clone> Clone for FrustumCuller<S>
Source§fn clone(&self) -> FrustumCuller<S>
fn clone(&self) -> FrustumCuller<S>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more