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