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: Pnt3, }, 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
Show fields
Show fields
Fields of Ortho
Implementations
impl Projection
[src]
impl Projection
[src]pub fn new_perspective(
viewport: Rect<i32>,
fov: Deg<f32>,
coordinate_origin: CoordinateOrigin
) -> Projection
[src]
viewport: Rect<i32>,
fov: Deg<f32>,
coordinate_origin: CoordinateOrigin
) -> Projection
pub fn new_ortho(
viewport: Rect<i32>,
coordinate_origin: CoordinateOrigin
) -> Projection
[src]
viewport: Rect<i32>,
coordinate_origin: CoordinateOrigin
) -> Projection
pub fn new_ortho_clipped(
viewport: Rect<i32>,
coordinate_origin: CoordinateOrigin,
near: f32,
far: f32
) -> Projection
[src]
viewport: Rect<i32>,
coordinate_origin: CoordinateOrigin,
near: f32,
far: f32
) -> Projection
pub fn into_parts(
self
) -> (Rect<i32>, Mat4, Mat4, Pnt3, (f32, f32), CoordinateOrigin)
[src]
self
) -> (Rect<i32>, Mat4, Mat4, Pnt3, (f32, f32), CoordinateOrigin)
pub fn viewport(&self) -> Rect<i32>
[src]
pub fn origin(&self) -> CoordinateOrigin
[src]
Trait Implementations
impl Clone for Projection
[src]
impl Clone for Projection
[src]fn clone(&self) -> Projection
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'de> Deserialize<'de> for Projection
[src]
impl<'de> Deserialize<'de> for Projection
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<'a> From<&'a Projection> for Mvp
[src]
impl<'a> From<&'a Projection> for Mvp
[src]fn from(projection: &'a Projection) -> Mvp
[src]
impl<'a> From<&'a Projection> for CameraMatrices
[src]
impl<'a> From<&'a Projection> for CameraMatrices
[src]fn from(projection: &'a Projection) -> CameraMatrices
[src]
impl Serialize for Projection
[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> Serialize for T where
T: Serialize + ?Sized,
[src]
impl<T> Serialize for T where
T: Serialize + ?Sized,
[src]pub fn erased_serialize(
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>
[src]
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[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]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,