Struct nalgebra::Orthographic3 [] [src]

pub struct Orthographic3<N> {
    // some fields omitted
}

A 3D orthographic projection stored without any 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 cheap but applying the transformation is costly.

Methods

impl<N: BaseFloat> Orthographic3<N>
[src]

fn new(left: N, right: N, bottom: N, top: N, znear: N, zfar: N) -> Orthographic3<N>

Creates a new 3D orthographic projection.

fn to_matrix(&self) -> Matrix4<N>

Builds a 4D projection matrix (using homogeneous coordinates) for this projection.

fn to_orthographic_matrix(&self) -> OrthographicMatrix3<N>

Build a OrthographicMatrix3 representing this projection.

impl<N: BaseFloat + Clone> Orthographic3<N>
[src]

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 project_point(&self, p: &Point3<N>) -> Point3<N>

Projects a point.

fn project_vector(&self, p: &Vector3<N>) -> Vector3<N>

Projects a vector.

Trait Implementations

impl<N: Copy> Copy for Orthographic3<N>
[src]

impl<N: Debug> Debug for Orthographic3<N>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<N: Clone> Clone for Orthographic3<N>
[src]

fn clone(&self) -> Orthographic3<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

impl<N: Decodable> Decodable for Orthographic3<N>
[src]

fn decode<__DN: Decoder>(__arg_0: &mut __DN) -> Result<Orthographic3<N>, __DN::Error>

impl<N: Encodable> Encodable for Orthographic3<N>
[src]

fn encode<__SN: Encoder>(&self, __arg_0: &mut __SN) -> Result<(), __SN::Error>

impl<N: PartialEq> PartialEq for Orthographic3<N>
[src]

fn eq(&self, __arg_0: &Orthographic3<N>) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Orthographic3<N>) -> bool

This method tests for !=.

impl<N: Eq> Eq for Orthographic3<N>
[src]