Enum rin::graphics::projection::Projection[][src]

pub enum Projection {
    Perspective {
        viewport: Rect<i32>,
        fov: Deg<f32>,
        znear: f32,
        zfar: f32,
        coordinate_origin: CoordinateOrigin,
        camera_position: Point<f32, U3>,
    },
    Ortho {
        viewport: Rect<i32>,
        znear: f32,
        zfar: f32,
        coordinate_origin: CoordinateOrigin,
    },
}

Represents a projection matrix decomposed in it’s parameters

Mostly used internall by Mvp

Variants

Perspective
Show fields

Fields of Perspective

viewport: Rect<i32>fov: Deg<f32>znear: f32zfar: f32coordinate_origin: CoordinateOrigincamera_position: Point<f32, U3>
Ortho
Show fields

Fields of Ortho

viewport: Rect<i32>znear: f32zfar: f32coordinate_origin: CoordinateOrigin

Implementations

impl Projection[src]

pub fn new_perspective(
    viewport: Rect<i32>,
    fov: Deg<f32>,
    coordinate_origin: CoordinateOrigin
) -> Projection
[src]

pub fn new_ortho(
    viewport: Rect<i32>,
    coordinate_origin: CoordinateOrigin
) -> Projection
[src]

pub fn new_ortho_clipped(
    viewport: Rect<i32>,
    coordinate_origin: CoordinateOrigin,
    near: f32,
    far: f32
) -> Projection
[src]

pub fn into_parts(
    self
) -> (Rect<i32>, Matrix<f32, U4, U4, <DefaultAllocator as Allocator<f32, U4, U4>>::Buffer>, Matrix<f32, U4, U4, <DefaultAllocator as Allocator<f32, U4, U4>>::Buffer>, Point<f32, U3>, (f32, f32), CoordinateOrigin)
[src]

pub fn viewport(&self) -> Rect<i32>[src]

pub fn origin(&self) -> CoordinateOrigin[src]

Trait Implementations

impl Clone for Projection[src]

impl Debug for Projection[src]

impl<'de> Deserialize<'de> for Projection[src]

impl<'a> From<&'a Projection> for CameraMatrices[src]

impl<'a> From<&'a Projection> for Mvp[src]

impl Serialize for Projection[src]

impl Copy for Projection[src]

Auto Trait Implementations

impl RefUnwindSafe for Projection

impl Send for Projection

impl Sync for Projection

impl Unpin for Projection

impl UnwindSafe for Projection

Blanket Implementations

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

impl<T> Any for T where
    T: Any
[src]

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

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

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Any + Send + Sync
[src]

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

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

impl<V> IntoPnt<V> for V[src]

impl<V> IntoVec<V> for V[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

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

type Output = T

Should always be Self

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

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> Slottable for T where
    T: Copy
[src]