Math functions for Matrix4.
static public function multiply3x3(m1:Matrix4, m2:Matrix4):Matrix4
Compute the multiplication of 2 Matrix4 but as they were 3x3 matrix.
The result of computation : a Matrix4.
static public function multiply(m1:Matrix4, m2:Matrix4):Matrix4
Compute the multiplication of 2 Matrix4.
The result of computation : a Matrix4.
static public function addMatrix(m1:Matrix4, m2:Matrix4):Matrix4
Compute an addition Matrix4.
The result of computation : a Matrix4.
static public function clone(m:Matrix4):Matrix4
Compute a clonage Matrix4.
The result of clonage : a Matrix4.
static public function vectorMult(m:Matrix4, v:Vector):Void
Compute a multiplication of a vertex and the matrix Matrix4.
Void
static public function vectorMult3x3(m:Matrix4, v:Vector):Void
Compute a multiplication of a vector and the matrix Matrix4
as there were of 3 dimensions.
Void
static public function projectVector(mp:Matrix4, v:Vector):VoidCompute the projection of a vector with a projection matrix. The result gives a 2 dimension point represented by the x and y properties of the vector (z is null). Be carefull: The passed matrix MUST be a PROJECTION matrix.
mp | MAtrix4 The projection matrix which will project the point from a 3D space to a 2D space. |
v | The vector to project. Properties will be modified! |
static public function eulerRotation(ax:Number, ay:Number, az:Number):Matrix4
Compute a Rotation Matrix4 from the Euler angle in degrees unit.
The result of computation : a Matrix4.
static public function rotationX(angle:Number):Matrix4
angle | Number angle of rotation in degrees |
the computed matrix
static public function rotationY(angle:Number):Matrix4
angle | Number angle of rotation in degrees |
the computed matrix
static public function rotationZ(angle:Number):Matrix4
angle | Number angle of rotation in degrees |
the computed matrix
static public function axisRotationVector(v:Vector, angle:Number):Matrix4
Compute a Rotation around a Vector which represents the axis of rotation Matrix4.
The result of computation : a Matrix4.
static public function axisRotation(u:Number, v:Number, w:Number, angle:Number):Matrix4
Compute a Rotation around an axis Matrix4.
The result of computation : a Matrix4.
static public function translation(nTx:Number, nTy:Number, nTz:Number):Matrix4
Compute a translation Matrix4.
|1 0 0 0| |0 1 0 0| |0 0 1 0| |Tx Ty Tz 1|
The result of computation : a Matrix4.
static public function translationVector(v:Vector):Matrix4
Compute a translation from a vector Matrix4.
|1 0 0 0| |0 1 0 0| |0 0 1 0| |Tx Ty Tz 1|
static public function scale(nXScale:Number, nYScale:Number, nZScale:Number):Matrix4
Compute a scale Matrix4.
|Sx 0 0 0| |0 Sy 0 0| |0 0 Sz 0| |0 0 0 1|
The result of computation : a Matrix.
static public function scaleVector(v:Vector):Matrix4
Compute a scale Matrix4.
|Sx 0 0 0| |0 Sy 0 0| |0 0 Sz 0| |0 0 0 1|
The result of computation : a Matrix.
static public function det(m:Matrix4):NumberCompute the determinant of the 4x4 square matrix
m | a Matrix4 |
Number the determinant
static public function getTrace(m:Matrix4):NumberComputes the trace of the matrix.
m | Matrix4 The matrix we want to compute the trace |
The trace value which is the sum of the element on the diagonal
static public function getInverse(m:Matrix4):Matrix4Return the inverse of the matrix passed in parameter.
m | The matrix4 to inverse |
Matrix4 The inverse Matrix4
static public function axisRotationWithReference(axis:Vector, ref:Vector, pAngle:Number):Matrix4Realize a rotation around a specific axis (the axis must be normalized!) and from an pangle degrees and around a specific position.
ref | Vector The center of rotation as a 3D point. |
pAngle | Number The angle of rotation in degrees. |