Struct nalgebra::Ortho3 [] [src]

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

A 3D orthographic projection stored without any matrix.

Reading or modifying its individual properties is cheap but applying the transformation is costly.

Methods

impl<N: BaseFloat> Ortho3<N>

fn new(width: N, height: N, znear: N, zfar: N) -> Ortho3<N>

Creates a new 3D orthographic projection.

fn to_mat(&self) -> Mat4<N>

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

fn to_persp_mat(&self) -> OrthoMat3<N>

Build a OrthoMat3 representing this projection.

impl<N: BaseFloat + Clone> Ortho3<N>

fn width(&self) -> N

The width of the view cuboid.

fn height(&self) -> N

The height 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_width(&mut self, width: N)

Sets the width of the view cuboid.

fn set_height(&mut self, height: N)

Sets the height 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_pnt(&self, p: &Pnt3<N>) -> Pnt3<N>

Projects a point.

fn project_vec(&self, p: &Vec3<N>) -> Vec3<N>

Projects a vector.

Trait Implementations

Derived Implementations

impl<N: Copy> Copy for Ortho3<N>

impl<N: Debug> Debug for Ortho3<N>

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

impl<N: Clone> Clone for Ortho3<N>

fn clone(&self) -> Ortho3<N>

fn clone_from(&mut self, source: &Self)

impl<N: Decodable> Decodable for Ortho3<N>

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

impl<N: Encodable> Encodable for Ortho3<N>

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

impl<N: PartialEq> PartialEq for Ortho3<N>

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

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

impl<N: Eq> Eq for Ortho3<N>