Struct nalgebra::OrthographicMatrix3
[−]
[src]
pub struct OrthographicMatrix3<N> { /* fields omitted */ }
A 3D orthographic projection stored as a 4D matrix.
This flips the z
axis and maps a axis-aligned cube to the unit cube with corners varying from
(-1, -1, -1)
to (1, 1, 1)
. Reading or modifying its individual properties is costly but
applying the transformation is cheap.
Methods
impl<N: BaseFloat> OrthographicMatrix3<N>
[src]
fn new(left: N, right: N, bottom: N, top: N, znear: N, zfar: N) -> OrthographicMatrix3<N>
Creates a new orthographic projection matrix.
fn new_with_fov(aspect: N, vfov: N, znear: N, zfar: N) -> OrthographicMatrix3<N>
Creates a new orthographic projection matrix from an aspect ratio and the vertical field of view.
unsafe fn new_with_matrix(matrix: Matrix4<N>) -> OrthographicMatrix3<N>
Creates a new orthographic matrix from a 4D matrix.
This is unsafe because the input matrix is not checked to be a orthographic projection.
fn as_matrix<'a>(&'a self) -> &'a Matrix4<N>
Returns a reference to the 4D matrix (using homogeneous coordinates) of this projection.
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 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.
fn project_point(&self, p: &Point3<N>) -> Point3<N>
Projects a point.
fn project_vector(&self, p: &Vector3<N>) -> Vector3<N>
Projects a vector.
impl<N: BaseFloat + Clone> OrthographicMatrix3<N>
[src]
fn to_matrix<'a>(&'a self) -> Matrix4<N>
Returns the 4D matrix (using homogeneous coordinates) of this projection.
Trait Implementations
impl<N: Eq> Eq for OrthographicMatrix3<N>
[src]
impl<N: PartialEq> PartialEq for OrthographicMatrix3<N>
[src]
fn eq(&self, __arg_0: &OrthographicMatrix3<N>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &OrthographicMatrix3<N>) -> bool
This method tests for !=
.
impl<N: Encodable> Encodable for OrthographicMatrix3<N>
[src]
impl<N: Decodable> Decodable for OrthographicMatrix3<N>
[src]
fn decode<__DN: Decoder>(__arg_0: &mut __DN) -> Result<OrthographicMatrix3<N>, __DN::Error>
impl<N: Clone> Clone for OrthographicMatrix3<N>
[src]
fn clone(&self) -> OrthographicMatrix3<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