Struct nalgebra::Persp3
[−]
[src]
pub struct Persp3<N> { // some fields omitted }
A 3D perspective projection stored without any matrix.
Reading or modifying its individual properties is cheap but applying the transformation is costly.
Methods
impl<N: BaseFloat> Persp3<N>
[src]
fn new(aspect: N, fov: N, znear: N, zfar: N) -> Persp3<N>
Creates a new 3D perspective projection.
fn to_mat(&self) -> Mat4<N>
Builds a 4D projection matrix (using homogeneous coordinates) for this projection.
fn to_persp_mat(&self) -> PerspMat3<N>
Build a PerspMat3
representing this projection.
impl<N: BaseFloat + Clone> Persp3<N>
[src]
fn aspect(&self) -> N
Gets the width / height
aspect ratio.
fn fov(&self) -> N
Gets the field of view of the view frustrum.
fn znear(&self) -> N
Gets the near plane offset of the view frustrum.
fn zfar(&self) -> N
Gets the far plane offset of the view frustrum.
fn set_aspect(&mut self, aspect: N)
Sets the width / height
aspect ratio of the view frustrum.
This method does not build any matrix.
fn set_fov(&mut self, fov: N)
Sets the field of view of the view frustrum.
This method does not build any matrix.
fn set_znear(&mut self, znear: N)
Sets the near plane offset of the view frustrum.
This method does not build any matrix.
fn set_zfar(&mut self, zfar: N)
Sets the far plane offset of the view frustrum.
This method does not build any matrix.
fn project_pnt(&self, p: &Pnt3<N>) -> Pnt3<N>
Projects a point.
fn project_vec(&self, p: &Vec3<N>) -> Vec3<N>
Projects a vector.
Trait Implementations
impl<N: Copy> Copy for Persp3<N>
[src]
impl<N: Debug> Debug for Persp3<N>
[src]
impl<N: Clone> Clone for Persp3<N>
[src]
fn clone(&self) -> Persp3<N>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<N: Decodable> Decodable for Persp3<N>
[src]
impl<N: Encodable> Encodable for Persp3<N>
[src]
impl<N: PartialEq> PartialEq for Persp3<N>
[src]
fn eq(&self, __arg_0: &Persp3<N>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Persp3<N>) -> bool
This method tests for !=
.