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,
}A 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 Frustumpub 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
) -> FrustumCreate 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) -> boolpub fn collide_bcube(&self, bcube: BCube) -> bool[src]
pub fn collide_bcube(&self, bcube: BCube) -> boolIf viewing frustum collides with the bounding box.
pub fn collide_point(&self, point: Vec3) -> bool[src]
pub fn collide_point(&self, point: Vec3) -> boolIf viewing frustum collides with a point.
Trait Implementations
impl Mul<Frustum> for Mat4[src]
impl Mul<Frustum> for Mat4type Output = Frustum
The resulting type after applying the * operator.
fn mul(self, rhs: Frustum) -> Self::Output[src]
fn mul(self, rhs: Frustum) -> Self::OutputPerforms the * operation.
impl Clone for Frustum[src]
impl Clone for Frustumfn clone(&self) -> Frustum[src]
fn clone(&self) -> FrustumReturns 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 Frustumimpl PartialEq for Frustum[src]
impl PartialEq for Frustumfn eq(&self, other: &Frustum) -> bool[src]
fn eq(&self, other: &Frustum) -> boolThis 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) -> boolThis method tests for !=.
impl Debug for Frustum[src]
impl Debug for Frustum