Std geom affinemat3
Struct AffineMat3#
The generic AffineMat3f class provides support for affine 3x3 matrices.
An affine 3x3 matrix is a 3x3 matrix whose right hand column is always 0,0,1.
Affine 3x3 matrices are often used for 2d 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 | |
---|---|
i | The first row of the matrix. |
j | The second row of the matrix. |
t | The third row of the matrix. |
Constructors | |
---|---|
New | Creates a new matrix. |
Methods | |
---|---|
Operator * | Multiplies a vector by the matrix. |
Operator - | Inverts the matrix. |
Rotate | Applies a rotation transformation to the matrix. |
Scale | Applies a scale transformation to the matrix. |
Transform | Multiplies a vector by 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. |
Functions | |
---|---|
Ortho | Creates a matrix representing an orthographic projection. |
Rotation | Creates a matrix representing a rotation. |
Scaling | Creates a matrix representing a scaling. |
Translation | Creates a matrix representing a translation. |