Enum crayon::math::frustum::Projection
[−]
[src]
pub enum Projection<S: BaseFloat> { Ortho { width: S, height: S, near: S, far: S, }, Perspective { fovy: Rad<S>, aspect: S, near: S, far: S, }, }
Projections.
Variants
Ortho
Orthographic projection.
Fields of Ortho
width: S | The width of orthographic window. |
height: S | The height of orthographic window. |
near: S | The near clip plane. |
far: S | The far clip plane. |
Perspective
Perspective projection.
Fields of Perspective
fovy: Rad<S> | Field of view in vertical. |
aspect: S | The aspect of width / height. |
near: S | The near clip plane. |
far: S | The far clip plane. |
Methods
impl<S: BaseFloat> Projection<S>
[src]
pub fn ortho(w: S, h: S, n: S, f: S) -> Self
[src]
pub fn perspective(fovy: Rad<S>, aspect: S, n: S, f: S) -> Self
[src]
pub fn to_matrix(&self) -> Matrix4<S>
[src]
pub fn validate(&self)
[src]
pub fn matrix(projection: Projection<S>) -> Matrix4<S>
[src]
Gets the projection matrix in left hand coordinates.
pub fn ortho_matrix(w: S, h: S, n: S, f: S) -> Matrix4<S>
[src]
Gets the orthographic projection matrix in left hand coordinates.
pub fn perspective_matrix(fovy: Rad<S>, aspect: S, n: S, f: S) -> Matrix4<S>
[src]
Gets the perspective projection matrix in left hand coordinates.
Trait Implementations
impl<S: Debug + BaseFloat> Debug for Projection<S>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<S: Clone + BaseFloat> Clone for Projection<S>
[src]
fn clone(&self) -> Projection<S>
[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<S: Copy + BaseFloat> Copy for Projection<S>
[src]
impl<S: PartialEq + BaseFloat> PartialEq for Projection<S>
[src]
fn eq(&self, __arg_0: &Projection<S>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Projection<S>) -> bool
[src]
This method tests for !=
.
Auto Trait Implementations
impl<S> Send for Projection<S> where
S: Send,
S: Send,
impl<S> Sync for Projection<S> where
S: Sync,
S: Sync,