Trait geo_nd::SqMatrix4

source ·
pub trait SqMatrix4<F: Float, V3: Vector<F, 3>, V4: Vector<F, 4>>: SqMatrix<V4, F, 4, 16> {
    // Required methods
    fn perspective(fov: F, aspect: F, near: F, far: F) -> Self;
    fn look_at(eye: &V3, center: &V3, up: &V3) -> Self;
    fn translate3(&mut self, by: &V3);
    fn translate4(&mut self, by: &V4);
}
Expand description

The SqMatrix4 trait describes a 4-dimensional square matrix of Float type that operates on a Vector.

Required Methods§

source

fn perspective(fov: F, aspect: F, near: F, far: F) -> Self

Generate a perspective matrix

source

fn look_at(eye: &V3, center: &V3, up: &V3) -> Self

Generate a matrix that represents a ‘look at a vector’

source

fn translate3(&mut self, by: &V3)

Translate the matrix by a Vec3

source

fn translate4(&mut self, by: &V4)

Translate the matrix by a Vec4

Implementors§

source§

impl<F: Float> SqMatrix4<F, FArray<F, 3>, FArray<F, 4>> for FArray2<F, 4, 16>