Struct nalgebra::geometry::OrthographicBase
[−]
[src]
pub struct OrthographicBase<N: Scalar, S: Storage<N, U4, U4>> { /* fields omitted */ }
A 3D orthographic projection stored as an homogeneous 4x4 matrix.
Methods
impl<N, S> OrthographicBase<N, S> where
N: Real,
S: OwnedStorage<N, U4, U4>,
S::Alloc: OwnedAllocator<N, U4, U4, S>,
[src]
N: Real,
S: OwnedStorage<N, U4, U4>,
S::Alloc: OwnedAllocator<N, U4, U4, S>,
fn new(left: N, right: N, bottom: N, top: N, znear: N, zfar: N) -> Self
Creates a new orthographic projection matrix.
fn from_matrix_unchecked(matrix: SquareMatrix<N, U4, S>) -> Self
Wraps the given matrix to interpret it as a 3D orthographic matrix.
It is not checked whether or not the given matrix actually represents an orthographic projection.
fn from_fov(aspect: N, vfov: N, znear: N, zfar: N) -> Self
Creates a new orthographic projection matrix from an aspect ratio and the vertical field of view.
impl<N: Real, S: Storage<N, U4, U4>> OrthographicBase<N, S>
[src]
fn as_matrix(&self) -> &SquareMatrix<N, U4, S>
A reference to the underlying homogeneous transformation matrix.
fn unwrap(self) -> SquareMatrix<N, U4, S>
Retrieves the underlying homogeneous matrix.
fn inverse(&self) -> OwnedSquareMatrix<N, U4, S::Alloc>
Retrieves the inverse of the underlying homogeneous matrix.
fn to_homogeneous(&self) -> OwnedSquareMatrix<N, U4, S::Alloc>
Computes the corresponding homogeneous matrix.
fn left(&self) -> N
The smallest x-coordinate of the view cuboid.
fn right(&self) -> N
The largest x-coordinate of the view cuboid.
fn bottom(&self) -> N
The smallest y-coordinate of the view cuboid.
fn top(&self) -> N
The largest y-coordinate of the view cuboid.
fn znear(&self) -> N
The near plane offset of the view cuboid.
fn zfar(&self) -> N
The far plane offset of the view cuboid.
fn project_point<SB>(
&self,
p: &PointBase<N, U3, SB>
) -> OwnedPoint<N, U3, SB::Alloc> where
SB: Storage<N, U3, U1>,
&self,
p: &PointBase<N, U3, SB>
) -> OwnedPoint<N, U3, SB::Alloc> where
SB: Storage<N, U3, U1>,
Projects a point. Faster than matrix multiplication.
fn unproject_point<SB>(
&self,
p: &PointBase<N, U3, SB>
) -> OwnedPoint<N, U3, SB::Alloc> where
SB: Storage<N, U3, U1>,
&self,
p: &PointBase<N, U3, SB>
) -> OwnedPoint<N, U3, SB::Alloc> where
SB: Storage<N, U3, U1>,
Un-projects a point. Faster than multiplication by the underlying matrix inverse.
fn project_vector<SB>(
&self,
p: &ColumnVector<N, U3, SB>
) -> OwnedColumnVector<N, U3, SB::Alloc> where
SB: Storage<N, U3, U1>,
&self,
p: &ColumnVector<N, U3, SB>
) -> OwnedColumnVector<N, U3, SB::Alloc> where
SB: Storage<N, U3, U1>,
Projects a vector. Faster than matrix multiplication.
impl<N: Real, S: StorageMut<N, U4, U4>> OrthographicBase<N, S>
[src]
fn set_left(&mut self, left: N)
Sets the smallest x-coordinate of the view cuboid.
fn set_right(&mut self, right: N)
Sets the largest x-coordinate of the view cuboid.
fn set_bottom(&mut self, bottom: N)
Sets the smallest y-coordinate of the view cuboid.
fn set_top(&mut self, top: N)
Sets the largest y-coordinate of the view cuboid.
fn set_znear(&mut self, znear: N)
Sets the near plane offset of the view cuboid.
fn set_zfar(&mut self, zfar: N)
Sets the far plane offset of the view cuboid.
fn set_left_and_right(&mut self, left: N, right: N)
Sets the view cuboid coordinates along the x
axis.
fn set_bottom_and_top(&mut self, bottom: N, top: N)
Sets the view cuboid coordinates along the y
axis.
fn set_znear_and_zfar(&mut self, znear: N, zfar: N)
Sets the near and far plane offsets of the view cuboid.
Trait Implementations
impl<N: Debug + Scalar, S: Debug + Storage<N, U4, U4>> Debug for OrthographicBase<N, S>
[src]
impl<N: Clone + Scalar, S: Clone + Storage<N, U4, U4>> Clone for OrthographicBase<N, S>
[src]
fn clone(&self) -> OrthographicBase<N, S>
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: Copy + Scalar, S: Copy + Storage<N, U4, U4>> Copy for OrthographicBase<N, S>
[src]
impl<N, S> Eq for OrthographicBase<N, S> where
N: Scalar + Eq,
S: Storage<N, U4, U4>,
[src]
N: Scalar + Eq,
S: Storage<N, U4, U4>,
impl<N: Scalar, S: Storage<N, U4, U4>> PartialEq for OrthographicBase<N, S>
[src]
fn eq(&self, right: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<N, S> Rand for OrthographicBase<N, S> where
N: Real + Rand,
S: OwnedStorage<N, U4, U4>,
S::Alloc: OwnedAllocator<N, U4, U4, S>,
[src]
N: Real + Rand,
S: OwnedStorage<N, U4, U4>,
S::Alloc: OwnedAllocator<N, U4, U4, S>,