pub struct Frustum<S: BaseFloat> {
pub left: Plane<S>,
pub right: Plane<S>,
pub bottom: Plane<S>,
pub top: Plane<S>,
pub near: Plane<S>,
pub far: Plane<S>,
/* private fields */
}Expand description
View frustum, used for frustum culling
Fields§
§left: Plane<S>Left plane
right: Plane<S>Right plane
bottom: Plane<S>Bottom plane
top: Plane<S>Top plane
near: Plane<S>Near plane
far: Plane<S>Far plane
Implementations§
Source§impl<S: BaseFloat> Frustum<S>
impl<S: BaseFloat> Frustum<S>
Sourcepub fn new(projection: Projection<S>) -> Frustum<S>
pub fn new(projection: Projection<S>) -> Frustum<S>
Construct a frustum.
pub fn projection(&self) -> Projection<S>
Sourcepub fn contains<B: PlaneBound<S>>(&self, bound: &B) -> PlaneRelation
pub fn contains<B: PlaneBound<S>>(&self, bound: &B) -> PlaneRelation
Find the spatial relation of a bound inside this frustum.
pub fn to_matrix(&self) -> Matrix4<S>
Trait Implementations§
Source§impl<S: BaseFloat> Into<FrustumPoints<S>> for Frustum<S>
impl<S: BaseFloat> Into<FrustumPoints<S>> for Frustum<S>
Source§fn into(self) -> FrustumPoints<S>
fn into(self) -> FrustumPoints<S>
Converts this type into the (usually inferred) input type.
impl<S: Copy + BaseFloat> Copy for Frustum<S>
impl<S: BaseFloat> StructuralPartialEq for Frustum<S>
Auto Trait Implementations§
impl<S> Freeze for Frustum<S>where
S: Freeze,
impl<S> RefUnwindSafe for Frustum<S>where
S: RefUnwindSafe,
impl<S> Send for Frustum<S>where
S: Send,
impl<S> Sync for Frustum<S>where
S: Sync,
impl<S> Unpin for Frustum<S>where
S: Unpin,
impl<S> UnwindSafe for Frustum<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.