pub struct Frustum {
pub center: Vector,
pub radius: f32,
pub wfov: f32,
pub hfov: f32,
pub xrot: f32,
pub yrot: f32,
}Expand description
Single-precision frustum
Fields§
§center: VectorThe center of the frustum
radius: f32The radius of the frustum
wfov: f32The fov in x
hfov: f32the fov in y
xrot: f32how much rotated from facing “straight forward” in x
yrot: f32how much rotated from facing “straight forward” in y
Implementations§
Source§impl Frustum
impl Frustum
Sourcepub fn new(
center: Vector,
radius: f32,
xrot: f32,
yrot: f32,
wfov: f32,
hfov: f32,
) -> Frustum
pub fn new( center: Vector, radius: f32, xrot: f32, yrot: f32, wfov: f32, hfov: f32, ) -> Frustum
Create a new viewing frustum.
center- The center of the frustum cone.radius- How far can you see?xrot- Direction facing on x axis (radians).yrot- Direction facing on y axis (radians).wfov- The fov on the X axis (radians).hfov- The fov on the Y axis (radians).
Sourcepub fn collide_bbox(&self, bbox: BBox) -> bool
pub fn collide_bbox(&self, bbox: BBox) -> bool
Sourcepub fn collide_bcube(&self, bcube: BCube) -> bool
pub fn collide_bcube(&self, bcube: BCube) -> bool
If viewing frustum collides with the bounding box.
Sourcepub fn collide_point(&self, point: Vector) -> bool
pub fn collide_point(&self, point: Vector) -> bool
If viewing frustum collides with a point.
Trait Implementations§
impl Copy for Frustum
impl StructuralPartialEq for Frustum
Auto Trait Implementations§
impl Freeze for Frustum
impl RefUnwindSafe for Frustum
impl Send for Frustum
impl Sync for Frustum
impl Unpin for Frustum
impl UnwindSafe for Frustum
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