Matrix4 is a 4x4 matrix, useful for 3D calculations
Static variables
Static methods
staticappend(this:Float32Array, lhs:Matrix4):Void
Appends a second matrix by multiplying its values against the current one
Parameters:
| lhs | A second matrix instance | 
|---|
staticappendRotation(this:Float32Array, degrees:Float, axis:Vector4, ?pivotPoint:Vector4):Void
Appends rotation to the current matrix
Parameters:
| degrees | A rotation value (in degrees) | 
|---|---|
| axis | The coordinate position of the rotation axis | 
| pivotPoint | (Optional) A pivot point to use in the rotation | 
staticappendScale(this:Float32Array, xScale:Float, yScale:Float, zScale:Float):Void
Appends a scale value to the current matrix
Parameters:
| xScale | The x scale to append | 
|---|---|
| yScale | The y scale to append | 
| zScale | The z scale to append | 
staticappendTranslation(this:Float32Array, x:Float, y:Float, z:Float):Void
Increases the position/translation of the current matrix
Parameters:
| x | The x amount to offset the current position | 
|---|---|
| y | The y amount to offset the current position | 
| z | The z amount to offset the current position | 
staticclone(this:Float32Array):Matrix4
staticcopyColumnFrom(this:Float32Array, column:Int, vector:Vector4):Void
staticcopyColumnTo(this:Float32Array, column:Int, vector:Vector4):Void
staticcopyFrom(this:Float32Array, other:Matrix4):Void
staticcopyRowFrom(this:Float32Array, row:Int, vector:Vector4):Void
staticcopyRowTo(this:Float32Array, row:Int, vector:Vector4):Void
staticcreate2D(this:Float32Array, a:Float, b:Float, c:Float, d:Float, tx:Float = 0, ty:Float = 0):Void
Resets the current matrix using two-dimensional transform values
Parameters:
| a | A two-dimensional matrix a value | 
|---|---|
| b | A two-dimensional matrix b value | 
| c | A two-dimensional matrix c value | 
| d | A two-dimensional matrix d value | 
| tx | (Optional) A two-dimensional matrix tx value (default is 0) | 
| ty | (Optional) A two-dimensional matrix ty value (default is 0) | 
staticcreateOrtho(this:Float32Array, left:Float, right:Float, bottom:Float, top:Float, zNear:Float, zFar:Float):Void
Initializes this matrix with values for an orthographic projection, useful in rendering
Parameters:
| left | The left (or x0) coordinate for the projection | 
|---|---|
| right | The right (or x1) coordinate for the projection | 
| bottom | The bottom (or y0) coordinate for the projection | 
| top | The top (or y1) coordinate for the projection | 
| zNear | The near depth-clipping plane position | 
| zFar | The far depth-clipping plane position | 
staticdeltaTransformVector(this:Float32Array, v:Vector4, ?result:Vector4):Vector4
Returns the transformation matrix's translation, rotation, and scale settings as a Vector of three Vector4 objects.
staticinterpolate(thisMat:Matrix4, toMat:Matrix4, percent:Float, ?result:Matrix4):Matrix4
Interpolates from one Matrix4 instance to another, given a percentage between the two
Parameters:
| thisMat | The first  | 
|---|---|
| toMat | The second  | 
| percent | The percentage value to interpolate by | 
| result | (Optional) A  | 
Returns:
A Matrix4 with the resulting value
staticinterpolateTo(this:Float32Array, toMat:Matrix4, percent:Float):Void
Interpolates the current matrix toward another matrix, resetting the values of the current matrix
Parameters:
| toMat | The second  | 
|---|---|
| percetn | The percentage value to interpolate by | 
staticinvert(this:Float32Array):Bool
Attempts to invert the current matrix, so long as the determinant is greater than zero
Returns:
Whether the invert operation was successful
staticpointAt(this:Float32Array, pos:Vector4, ?at:Vector4, ?up:Vector4):Void
Sets the matrix values as a transformation orientated toward a certain vector position
Parameters:
| pos | A target vector position in absolute coordinates | 
|---|---|
| at | (Optional) A vector relative to this matrix which defines the current direction | 
| up | (Optional) A vector relative to this matrix which defines the "up" direction | 
staticprepend(this:Float32Array, rhs:Matrix4):Void
staticprependRotation(this:Float32Array, degrees:Float, axis:Vector4, ?pivotPoint:Vector4):Void
Prepends rotation to this matrix
Parameters:
| degrees | The rotation amount in degrees | 
|---|---|
| axis | The rotation axis | 
| pivotPoint | (Optional) A pivot point for the rotation | 
staticprependScale(this:Float32Array, xScale:Float, yScale:Float, zScale:Float):Void
Prepends scale to this matrix
Parameters:
| xScale | An x scale value | 
|---|---|
| yScale | A y scale value | 
| zScale | A z scale value | 
staticprependTranslation(this:Float32Array, x:Float, y:Float, z:Float):Void
Prepends translation values to this matrix
Parameters:
| x | An x translation value | 
|---|---|
| y | A y translation value | 
| z | A z translation value | 
statictransformVector(this:Float32Array, v:Vector4, ?result:Vector4):Vector4
statictransformVectors(this:Float32Array, ain:Float32Array, aout:Float32Array):Void
Transforms a series of [x, y, z] value pairs at once
Parameters:
| ain | An input  | 
|---|---|
| aout | An output  |