Struct nalgebra::geometry::Perspective3 [−][src]
pub struct Perspective3<N: Scalar> { /* fields omitted */ }
A 3D perspective projection stored as a homogeneous 4x4 matrix.
Implementations
impl<N: RealField> Perspective3<N>
[src]
impl<N: RealField> Perspective3<N>
[src]pub fn new(aspect: N, fovy: N, znear: N, zfar: N) -> Self
[src]
Creates a new perspective matrix from the aspect ratio, y field of view, and near/far planes.
pub fn from_matrix_unchecked(matrix: Matrix4<N>) -> Self
[src]
Wraps the given matrix to interpret it as a 3D perspective matrix.
It is not checked whether or not the given matrix actually represents a perspective projection.
pub fn inverse(&self) -> Matrix4<N>
[src]
Retrieves the inverse of the underlying homogeneous matrix.
pub fn to_homogeneous(&self) -> Matrix4<N>
[src]
Computes the corresponding homogeneous matrix.
pub fn as_matrix(&self) -> &Matrix4<N>
[src]
A reference to the underlying homogeneous transformation matrix.
pub fn as_projective(&self) -> &Projective3<N>
[src]
A reference to this transformation seen as a Projective3
.
pub fn to_projective(&self) -> Projective3<N>
[src]
This transformation seen as a Projective3
.
pub fn into_inner(self) -> Matrix4<N>
[src]
Retrieves the underlying homogeneous matrix.
pub fn unwrap(self) -> Matrix4<N>
[src]
use .into_inner()
instead
Retrieves the underlying homogeneous matrix. Deprecated: Use Perspective3::into_inner instead.
pub fn aspect(&self) -> N
[src]
Gets the width / height
aspect ratio of the view frustum.
pub fn fovy(&self) -> N
[src]
Gets the y field of view of the view frustum.
pub fn znear(&self) -> N
[src]
Gets the near plane offset of the view frustum.
pub fn zfar(&self) -> N
[src]
Gets the far plane offset of the view frustum.
pub fn project_point(&self, p: &Point3<N>) -> Point3<N>
[src]
Projects a point. Faster than matrix multiplication.
pub fn unproject_point(&self, p: &Point3<N>) -> Point3<N>
[src]
Un-projects a point. Faster than multiplication by the matrix inverse.
pub fn project_vector<SB>(&self, p: &Vector<N, U3, SB>) -> Vector3<N> where
SB: Storage<N, U3>,
[src]
SB: Storage<N, U3>,
Projects a vector. Faster than matrix multiplication.
pub fn set_aspect(&mut self, aspect: N)
[src]
Updates this perspective matrix with a new width / height
aspect ratio of the view
frustum.
pub fn set_fovy(&mut self, fovy: N)
[src]
Updates this perspective with a new y field of view of the view frustum.
pub fn set_znear(&mut self, znear: N)
[src]
Updates this perspective matrix with a new near plane offset of the view frustum.
pub fn set_zfar(&mut self, zfar: N)
[src]
Updates this perspective matrix with a new far plane offset of the view frustum.
pub fn set_znear_and_zfar(&mut self, znear: N, zfar: N)
[src]
Updates this perspective matrix with new near and far plane offsets of the view frustum.
Trait Implementations
impl<N: RealField> Clone for Perspective3<N>
[src]
impl<N: RealField> Clone for Perspective3<N>
[src]fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<N: RealField> Debug for Perspective3<N>
[src]
impl<N: RealField> Debug for Perspective3<N>
[src]impl<'a, N: RealField + Deserialize<'a>> Deserialize<'a> for Perspective3<N>
[src]
impl<'a, N: RealField + Deserialize<'a>> Deserialize<'a> for Perspective3<N>
[src]fn deserialize<Des>(deserializer: Des) -> Result<Self, Des::Error> where
Des: Deserializer<'a>,
[src]
Des: Deserializer<'a>,
impl<N: RealField> Distribution<Perspective3<N>> for Standard where
Standard: Distribution<N>,
[src]
impl<N: RealField> Distribution<Perspective3<N>> for Standard where
Standard: Distribution<N>,
[src]fn sample<'a, R: Rng + ?Sized>(&self, r: &'a mut R) -> Perspective3<N>
[src]
pub fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
[src]
R: Rng,
impl<N: RealField> From<Perspective3<N>> for Matrix4<N>
[src]
impl<N: RealField> From<Perspective3<N>> for Matrix4<N>
[src]fn from(pers: Perspective3<N>) -> Self
[src]
impl<N: RealField> PartialEq<Perspective3<N>> for Perspective3<N>
[src]
impl<N: RealField> PartialEq<Perspective3<N>> for Perspective3<N>
[src]impl<N: RealField + Serialize> Serialize for Perspective3<N>
[src]
impl<N: RealField + Serialize> Serialize for Perspective3<N>
[src]impl<N: RealField> Copy for Perspective3<N>
[src]
Auto Trait Implementations
impl<N> RefUnwindSafe for Perspective3<N> where
N: RefUnwindSafe,
N: RefUnwindSafe,
impl<N> Send for Perspective3<N> where
N: Send,
N: Send,
impl<N> Sync for Perspective3<N> where
N: Sync,
N: Sync,
impl<N> Unpin for Perspective3<N> where
N: Unpin,
N: Unpin,
impl<N> UnwindSafe for Perspective3<N> where
N: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
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>,