Struct ami::Frustum [−][src]
pub struct Frustum { pub center: Vec3, pub radius: f32, pub wfov: f32, pub hfov: f32, pub xrot: f32, pub yrot: f32, }
Single-precision frustum
Fields
center: Vec3
The center of the frustum
radius: f32
The radius of the frustum
wfov: f32
The fov in x
hfov: f32
the fov in y
xrot: f32
how much rotated from facing "straight forward" in x
yrot: f32
how much rotated from facing "straight forward" in y
Methods
impl Frustum
[src]
impl Frustum
pub fn new(
center: Vec3,
radius: f32,
xrot: f32,
yrot: f32,
wfov: f32,
hfov: f32
) -> Frustum
[src]
pub fn new(
center: Vec3,
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).
pub fn collide_bbox(&self, bbox: BBox) -> bool
[src]
pub fn collide_bbox(&self, bbox: BBox) -> bool
pub fn collide_bcube(&self, bcube: BCube) -> bool
[src]
pub fn collide_bcube(&self, bcube: BCube) -> bool
If viewing frustum collides with the bounding box.
pub fn collide_point(&self, point: Vec3) -> bool
[src]
pub fn collide_point(&self, point: Vec3) -> bool
If viewing frustum collides with a point.
Trait Implementations
impl Clone for Frustum
[src]
impl Clone for Frustum
fn clone(&self) -> Frustum
[src]
fn clone(&self) -> Frustum
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for Frustum
[src]
impl Copy for Frustum
impl PartialEq for Frustum
[src]
impl PartialEq for Frustum
fn eq(&self, other: &Frustum) -> bool
[src]
fn eq(&self, other: &Frustum) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Frustum) -> bool
[src]
fn ne(&self, other: &Frustum) -> bool
This method tests for !=
.
impl Debug for Frustum
[src]
impl Debug for Frustum