[][src]Struct frustum::Frustum

pub struct Frustum {
    pub origin: Point3<WorldSpace>,
    pub target: Point3<WorldSpace>,
    pub fovy: f64,
    pub ncp: f64,
    pub fcp: f64,
    pub width: usize,
    pub height: usize,
}

Frustum struct

Fields

origin: Point3<WorldSpace>target: Point3<WorldSpace>fovy: f64ncp: f64fcp: f64width: usizeheight: usize

Methods

impl Frustum[src]

pub fn view(&self) -> Transform3<WorldSpace, CameraSpace>[src]

Generates the view matrix. Using left hand.

pub fn projection(&self) -> Transform3<CameraSpace, ViewSpace>[src]

Generates the perspective projection matrix. Using left hand with zero to one (y flip).

pub fn screen(&self) -> Transform3<ViewSpace, ScreenSpace>[src]

Generates the screen matrix.

pub fn ray_from_ncp(
    &self,
    screen_coords: &Point2<ScreenSpace>
) -> Option<(Point3<WorldSpace>, Vec3<WorldSpace>)>
[src]

Calculate for a given screen space coordinate the corresponding ray origin and direction on the near clipping plane.

pub fn distance(&self, position: &Point3<WorldSpace>) -> f64[src]

pub fn iter(&self) -> FrustumIterator[src]

Trait Implementations

impl Clone for Frustum[src]

impl Copy for Frustum[src]

impl Debug for Frustum[src]

Auto Trait Implementations

impl RefUnwindSafe for Frustum

impl Send for Frustum

impl Sync for Frustum

impl Unpin for Frustum

impl UnwindSafe for Frustum

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.