[−][src]Struct cv::nalgebra::Perspective3
A 3D perspective projection stored as a homogeneous 4x4 matrix.
Implementations
impl<N> Perspective3<N> where
N: RealField,
[src]
N: RealField,
pub fn new(aspect: N, fovy: N, znear: N, zfar: N) -> Perspective3<N>
[src]
Creates a new perspective matrix from the aspect ratio, y field of view, and near/far planes.
pub fn from_matrix_unchecked(
matrix: Matrix<N, U4, U4, <DefaultAllocator as Allocator<N, U4, U4>>::Buffer>
) -> Perspective3<N>
[src]
matrix: Matrix<N, U4, U4, <DefaultAllocator as Allocator<N, U4, U4>>::Buffer>
) -> Perspective3<N>
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
) -> Matrix<N, U4, U4, <DefaultAllocator as Allocator<N, U4, U4>>::Buffer>
[src]
&self
) -> Matrix<N, U4, U4, <DefaultAllocator as Allocator<N, U4, U4>>::Buffer>
Retrieves the inverse of the underlying homogeneous matrix.
pub fn to_homogeneous(
&self
) -> Matrix<N, U4, U4, <DefaultAllocator as Allocator<N, U4, U4>>::Buffer>
[src]
&self
) -> Matrix<N, U4, U4, <DefaultAllocator as Allocator<N, U4, U4>>::Buffer>
Computes the corresponding homogeneous matrix.
pub fn as_matrix(
&self
) -> &Matrix<N, U4, U4, <DefaultAllocator as Allocator<N, U4, U4>>::Buffer>
[src]
&self
) -> &Matrix<N, U4, U4, <DefaultAllocator as Allocator<N, U4, U4>>::Buffer>
A reference to the underlying homogeneous transformation matrix.
pub fn as_projective(&self) -> &Transform<N, U3, TProjective>
[src]
A reference to this transformation seen as a Projective3
.
pub fn to_projective(&self) -> Transform<N, U3, TProjective>
[src]
This transformation seen as a Projective3
.
pub fn into_inner(
self
) -> Matrix<N, U4, U4, <DefaultAllocator as Allocator<N, U4, U4>>::Buffer>
[src]
self
) -> Matrix<N, U4, U4, <DefaultAllocator as Allocator<N, U4, U4>>::Buffer>
Retrieves the underlying homogeneous matrix.
pub fn unwrap(
self
) -> Matrix<N, U4, U4, <DefaultAllocator as Allocator<N, U4, U4>>::Buffer>
[src]
self
) -> Matrix<N, U4, U4, <DefaultAllocator as Allocator<N, U4, U4>>::Buffer>
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: &Point<N, U3>) -> Point<N, U3>
[src]
Projects a point. Faster than matrix multiplication.
pub fn unproject_point(&self, p: &Point<N, U3>) -> Point<N, U3>
[src]
Un-projects a point. Faster than multiplication by the matrix inverse.
pub fn project_vector<SB>(
&self,
p: &Matrix<N, U3, U1, SB>
) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3, U1>>::Buffer> where
SB: Storage<N, U3, U1>,
[src]
&self,
p: &Matrix<N, U3, U1, SB>
) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3, U1>>::Buffer> where
SB: Storage<N, U3, U1>,
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> Clone for Perspective3<N> where
N: RealField,
[src]
N: RealField,
fn clone(&self) -> Perspective3<N>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<N> Copy for Perspective3<N> where
N: RealField,
[src]
N: RealField,
impl<N> Debug for Perspective3<N> where
N: RealField,
[src]
N: RealField,
impl<N> From<Perspective3<N>> for Matrix<N, U4, U4, <DefaultAllocator as Allocator<N, U4, U4>>::Buffer> where
N: RealField,
[src]
N: RealField,
fn from(
orth: Perspective3<N>
) -> Matrix<N, U4, U4, <DefaultAllocator as Allocator<N, U4, U4>>::Buffer>
[src]
orth: Perspective3<N>
) -> Matrix<N, U4, U4, <DefaultAllocator as Allocator<N, U4, U4>>::Buffer>
impl<N> PartialEq<Perspective3<N>> for Perspective3<N> where
N: RealField,
[src]
N: RealField,
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<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Scalar for T where
T: PartialEq<T> + Copy + Any + Debug,
[src]
T: PartialEq<T> + Copy + Any + Debug,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,