Skip to content

Std geom affinemat4

std:std.geom.AffineMat4

Struct AffineMat4#

The generic AffineMat4f class provides support for affine 4x4 matrices.

An affine 4x4 matrix is a 4x4 matrix whose right hand column is always 0,0,0,1.

Affine 4x4 matrices are often used for 3d transformations such as scaling, rotation and translation.

Unless otherwise noted, methods and operators always return a new vec3 containing the result, without modifying any parameters or 'self'.

This allows you to chain operators together easily just like 'real' expressions.

Fields
m The matrix component of the matrix.
t The translation component of the matrix.
Constructors
New Creates a new matrix.
Methods
Operator * Multiplies the matrix by another matrix.
Operator - Inverts the matrix.
Rotate Applies a rotation transformation to the matrix.
Scale Applies a scaling transformation to the matrix.
Translate Applies a translation transformation to the matrix.
Operator To Converts the matrix to a matrix of a different type, or a printable string.
Operator ~ Transposes the matrix.
Functions
Rotation Creates a matrix repsenting a rotation form eular angles or a quat.
Scaling Creates a matrix representing a scaling.
Translation Creates a matrix representing a translation.