Struct heron::rapier_plugin::rapier::parry::na::Perspective3 [−][src]
pub struct Perspective3<T> where
T: Scalar, { /* fields omitted */ }
A 3D perspective projection stored as a homogeneous 4x4 matrix.
Implementations
impl<T> Perspective3<T> where
T: RealField,
[src]
T: RealField,
pub fn new(aspect: T, fovy: T, znear: T, zfar: T) -> Perspective3<T>
[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<T, Const<{_: usize}>, Const<{_: usize}>, ArrayStorage<T, 4_usize, 4_usize>>
) -> Perspective3<T>
[src]
matrix: Matrix<T, Const<{_: usize}>, Const<{_: usize}>, ArrayStorage<T, 4_usize, 4_usize>>
) -> Perspective3<T>
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<T, Const<{_: usize}>, Const<{_: usize}>, ArrayStorage<T, 4_usize, 4_usize>>
[src]
&self
) -> Matrix<T, Const<{_: usize}>, Const<{_: usize}>, ArrayStorage<T, 4_usize, 4_usize>>
Retrieves the inverse of the underlying homogeneous matrix.
pub fn to_homogeneous(
&self
) -> Matrix<T, Const<{_: usize}>, Const<{_: usize}>, ArrayStorage<T, 4_usize, 4_usize>>
[src]
&self
) -> Matrix<T, Const<{_: usize}>, Const<{_: usize}>, ArrayStorage<T, 4_usize, 4_usize>>
Computes the corresponding homogeneous matrix.
pub fn as_matrix(
&self
) -> &Matrix<T, Const<{_: usize}>, Const<{_: usize}>, ArrayStorage<T, 4_usize, 4_usize>>
[src]
&self
) -> &Matrix<T, Const<{_: usize}>, Const<{_: usize}>, ArrayStorage<T, 4_usize, 4_usize>>
A reference to the underlying homogeneous transformation matrix.
pub fn as_projective(&self) -> &Transform<T, TProjective, 3_usize>
[src]
A reference to this transformation seen as a Projective3
.
pub fn to_projective(&self) -> Transform<T, TProjective, 3_usize>
[src]
This transformation seen as a Projective3
.
pub fn into_inner(
self
) -> Matrix<T, Const<{_: usize}>, Const<{_: usize}>, ArrayStorage<T, 4_usize, 4_usize>>
[src]
self
) -> Matrix<T, Const<{_: usize}>, Const<{_: usize}>, ArrayStorage<T, 4_usize, 4_usize>>
Retrieves the underlying homogeneous matrix.
pub fn unwrap(
self
) -> Matrix<T, Const<{_: usize}>, Const<{_: usize}>, ArrayStorage<T, 4_usize, 4_usize>>
[src]
self
) -> Matrix<T, Const<{_: usize}>, Const<{_: usize}>, ArrayStorage<T, 4_usize, 4_usize>>
use .into_inner()
instead
Retrieves the underlying homogeneous matrix. Deprecated: Use Perspective3::into_inner instead.
pub fn aspect(&self) -> T
[src]
Gets the width / height
aspect ratio of the view frustum.
pub fn fovy(&self) -> T
[src]
Gets the y field of view of the view frustum.
pub fn znear(&self) -> T
[src]
Gets the near plane offset of the view frustum.
pub fn zfar(&self) -> T
[src]
Gets the far plane offset of the view frustum.
pub fn project_point(&self, p: &Point<T, 3_usize>) -> Point<T, 3_usize>
[src]
Projects a point. Faster than matrix multiplication.
pub fn unproject_point(&self, p: &Point<T, 3_usize>) -> Point<T, 3_usize>
[src]
Un-projects a point. Faster than multiplication by the matrix inverse.
pub fn project_vector<SB>(
&self,
p: &Matrix<T, Const<{_: usize}>, Const<1_usize>, SB>
) -> Matrix<T, Const<{_: usize}>, Const<1_usize>, ArrayStorage<T, 3_usize, 1_usize>> where
SB: Storage<T, Const<{_: usize}>, Const<1_usize>>,
[src]
&self,
p: &Matrix<T, Const<{_: usize}>, Const<1_usize>, SB>
) -> Matrix<T, Const<{_: usize}>, Const<1_usize>, ArrayStorage<T, 3_usize, 1_usize>> where
SB: Storage<T, Const<{_: usize}>, Const<1_usize>>,
Projects a vector. Faster than matrix multiplication.
pub fn set_aspect(&mut self, aspect: T)
[src]
Updates this perspective matrix with a new width / height
aspect ratio of the view
frustum.
pub fn set_fovy(&mut self, fovy: T)
[src]
Updates this perspective with a new y field of view of the view frustum.
pub fn set_znear(&mut self, znear: T)
[src]
Updates this perspective matrix with a new near plane offset of the view frustum.
pub fn set_zfar(&mut self, zfar: T)
[src]
Updates this perspective matrix with a new far plane offset of the view frustum.
pub fn set_znear_and_zfar(&mut self, znear: T, zfar: T)
[src]
Updates this perspective matrix with new near and far plane offsets of the view frustum.
Trait Implementations
impl<T> Clone for Perspective3<T> where
T: RealField,
[src]
T: RealField,
pub fn clone(&self) -> Perspective3<T>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> Copy for Perspective3<T> where
T: RealField,
[src]
T: RealField,
impl<T> Debug for Perspective3<T> where
T: RealField,
[src]
T: RealField,
impl<T> From<Perspective3<T>> for Matrix<T, Const<{_: usize}>, Const<{_: usize}>, ArrayStorage<T, 4_usize, 4_usize>> where
T: RealField,
[src]
T: RealField,
pub fn from(
pers: Perspective3<T>
) -> Matrix<T, Const<{_: usize}>, Const<{_: usize}>, ArrayStorage<T, 4_usize, 4_usize>>
[src]
pers: Perspective3<T>
) -> Matrix<T, Const<{_: usize}>, Const<{_: usize}>, ArrayStorage<T, 4_usize, 4_usize>>
impl<T> PartialEq<Perspective3<T>> for Perspective3<T> where
T: RealField,
[src]
T: RealField,
Auto Trait Implementations
impl<T> RefUnwindSafe for Perspective3<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Perspective3<T> where
T: Send,
T: Send,
impl<T> Sync for Perspective3<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Perspective3<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Perspective3<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CloneAny for T where
T: Any + Clone,
T: Any + Clone,
impl<T> Component for T where
T: 'static + Send + Sync,
T: 'static + Send + Sync,
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> Downcast<T> for T
impl<T> DowncastSync for T where
T: Any + Send + Sync,
T: Any + Send + Sync,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Scalar for T where
T: Copy + PartialEq<T> + Debug + Any,
[src]
T: Copy + PartialEq<T> + Debug + Any,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> TypeData for T where
T: 'static + Send + Sync + Clone,
T: 'static + Send + Sync + Clone,
pub fn clone_type_data(&self) -> Box<dyn TypeData + 'static, Global>
impl<T> Upcast<T> for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,