Struct cgmath::Matrix4
[−]
[src]
pub struct Matrix4<S> { pub x: Vector4<S>, pub y: Vector4<S>, pub z: Vector4<S>, pub w: Vector4<S>, }
A 4 x 4, column major matrix
Fields
x | |
y | |
z | |
w |
Methods
impl<S> Matrix4<S>
fn new(c0r0: S, c0r1: S, c0r2: S, c0r3: S, c1r0: S, c1r1: S, c1r2: S, c1r3: S, c2r0: S, c2r1: S, c2r2: S, c2r3: S, c3r0: S, c3r1: S, c3r2: S, c3r3: S) -> Matrix4<S>
[−]
Create a new matrix, providing values for each index.
fn from_cols(c0: Vector4<S>, c1: Vector4<S>, c2: Vector4<S>, c3: Vector4<S>) -> Matrix4<S>
[−]
Create a new matrix, providing columns.
impl<S: BaseNum> Matrix4<S>
fn from_value(value: S) -> Matrix4<S>
[−]
Create a new diagonal matrix, providing a single value to use for each non-zero index.
fn zero() -> Matrix4<S>
[−]
Create a zero matrix (all zeros).
fn identity() -> Matrix4<S>
[−]
Create an identity matrix (diagonal matrix of ones).
fn from_translation(v: &Vector3<S>) -> Matrix4<S>
[−]
Create a translation matrix from a Vector3
impl<S: BaseFloat> Matrix4<S>
fn look_at(eye: &Point3<S>, center: &Point3<S>, up: &Vector3<S>) -> Matrix4<S>
[−]
Create a transformation matrix that will cause a vector to point at
dir
, using up
for orientation.