Struct nalgebra::PerspectiveMatrix3 [] [src]

pub struct PerspectiveMatrix3<N> { /* fields omitted */ }

A 3D perspective projection stored as a 4D matrix.

This maps a frustrum 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> PerspectiveMatrix3<N>
[src]

Creates a new perspective matrix from the aspect ratio, y field of view, and near/far planes.

Creates a new perspective projection matrix from a 4D matrix.

This is unsafe because the input matrix is not checked to be a perspective projection.

Returns a reference to the 4D matrix (using homogeneous coordinates) of this projection.

Gets the width / height aspect ratio of the view frustrum.

Gets the y field of view of the view frustrum.

Gets the near plane offset of the view frustrum.

Gets the far plane offset of the view frustrum.

Updates this projection matrix with a new width / height aspect ratio of the view frustrum.

Updates this projection with a new y field of view of the view frustrum.

Updates this projection matrix with a new near plane offset of the view frustrum.

Updates this projection matrix with a new far plane offset of the view frustrum.

Updates this projection matrix with new near and far plane offsets of the view frustrum.

Projects a point.

Projects a vector.

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

Returns the 4D matrix (using homogeneous coordinates) of this projection.

Trait Implementations

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

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

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

This method tests for !=.

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

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Formats the value using the given formatter.

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