| Package | sandy.core.data |
| Class | public final class Matrix4 |
| Property | Defined by | ||
|---|---|---|---|
| n11 : Number
Matrix4 cell.
| Matrix4 | ||
| n12 : Number
Matrix4 cell.
| Matrix4 | ||
| n13 : Number
Matrix4 cell.
| Matrix4 | ||
| n14 : Number
Matrix4 cell.
| Matrix4 | ||
| n21 : Number
Matrix4 cell.
| Matrix4 | ||
| n22 : Number
Matrix4 cell.
| Matrix4 | ||
| n23 : Number
Matrix4 cell.
| Matrix4 | ||
| n24 : Number
Matrix4 cell.
| Matrix4 | ||
| n31 : Number
Matrix4 cell.
| Matrix4 | ||
| n32 : Number
Matrix4 cell.
| Matrix4 | ||
| n33 : Number
Matrix4 cell.
| Matrix4 | ||
| n34 : Number
Matrix4 cell.
| Matrix4 | ||
| n41 : Number
Matrix4 cell.
| Matrix4 | ||
| n42 : Number
Matrix4 cell.
| Matrix4 | ||
| n43 : Number
Matrix4 cell.
| Matrix4 | ||
| n44 : Number
Matrix4 cell.
| Matrix4 | ||
| USE_FAST_MATH : Boolean = false [static]
Should we use fast math.
| Matrix4 | ||
| Method | Defined by | ||
|---|---|---|---|
|
Matrix4(pn11:Number = 1, pn12:Number = 0, pn13:Number = 0, pn14:Number = 0, pn21:Number = 0, pn22:Number = 1, pn23:Number = 0, pn24:Number = 0, pn31:Number = 0, pn32:Number = 0, pn33:Number = 1, pn34:Number = 0, pn41:Number = 0, pn42:Number = 0, pn43:Number = 0, pn44:Number = 1)
Creates a new Matrix4 matrix.
| Matrix4 | ||
|
Adds this matrix to a passed in matrix.
| Matrix4 | ||
|
axisRotation(u:Number, v:Number, w:Number, angle:Number):void
Compute a Rotation around an axis{
| Matrix4 | ||
|
axisRotationVector(v:Vector, angle:Number):void
Makes this matrix a rotation matrix for a rotation around a given axis.
| Matrix4 | ||
|
Realize a rotation around a specific axis through a specified point.
| Matrix4 | ||
|
Compute a clonage {
| Matrix4 | ||
|
Makes this matrix a copy of a passed in matrix.
| Matrix4 | ||
|
det():Number
Returns the determinant of this 4x4 matrix.
| Matrix4 | ||
|
det3x3():Number
Returns the determinant of the upper left 3x3 sub matrix of this matrix.
| Matrix4 | ||
|
eulerRotation(ax:Number, ay:Number, az:Number):void
Compute a Rotation {
| Matrix4 | ||
|
[static]
Get the eulers angles from the rotation matrix
| Matrix4 | ||
|
getTrace():Number
Returns the trace of the matrix.
| Matrix4 | ||
|
Returns a vector that containes the 3D position information.
| Matrix4 | ||
|
identity():void
Makes this matrix into an identity matrix.
| Matrix4 | ||
|
inverse():void
Return the inverse of the matrix passed in parameter.
| Matrix4 | ||
|
Multiplies this matrix by a passed in matrix.
| Matrix4 | ||
|
multiply3x3(m2:Matrix4):void
Multiplies this matrix by a passed in as if they were 3x3 matrices.
| Matrix4 | ||
|
multiply4x3(m2:Matrix4):void
Multiplies the upper left 3x3 sub matrix of this matrix by a passed in matrix.
| Matrix4 | ||
|
rotationX(angle:Number):void
Makes this matrix a rotation matrix for the given angle of rotation.
| Matrix4 | ||
|
rotationY(angle:Number):void
Makes this matrix a rotation matrix for the given angle of rotation.
| Matrix4 | ||
|
rotationZ(angle:Number):void
Makes this matrix a rotation matrix for the given angle of rotation.
| Matrix4 | ||
|
scale(nXScale:Number, nYScale:Number, nZScale:Number):void
Makes this matrix a scale matrix from scale components.
| Matrix4 | ||
|
scaleVector(v:Vector):void
Makes this matrix a scale matrix from a scale vector.
| Matrix4 | ||
|
toString():String
Returns a string representation of this matrix.
| Matrix4 | ||
|
translation(nTx:Number, nTy:Number, nTz:Number):void
Makes this matrix a translation matrix from translation components.
| Matrix4 | ||
|
translationVector(v:Vector):void
Makes this matrix a translation matrix from a translation vector.
| Matrix4 | ||
|
vectorMult(pv:Vector):void
Multiplies a vertex with this matrix.
| Matrix4 | ||
|
vectorMult3x3(pv:Vector):void
Multiplies a 3D vector with this matrix.
| Matrix4 | ||
|
zero():void
Makes this matrix into a zero matrix.
| Matrix4 | ||
| n11 | property |
public var n11:NumberMatrix4 cell.
1 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
| n12 | property |
public var n12:NumberMatrix4 cell.
0 1 0 0
0 0 0 0
0 0 0 0
0 0 0 0
| n13 | property |
public var n13:NumberMatrix4 cell.
0 0 1 0
0 0 0 0
0 0 0 0
0 0 0 0
| n14 | property |
public var n14:NumberMatrix4 cell.
0 0 0 1
0 0 0 0
0 0 0 0
0 0 0 0
| n21 | property |
public var n21:NumberMatrix4 cell.
0 0 0 0
1 0 0 0
0 0 0 0
0 0 0 0
| n22 | property |
public var n22:NumberMatrix4 cell.
0 0 0 0
0 1 0 0
0 0 0 0
0 0 0 0
| n23 | property |
public var n23:NumberMatrix4 cell.
0 0 0 0
0 0 1 0
0 0 0 0
0 0 0 0
| n24 | property |
public var n24:NumberMatrix4 cell.
0 0 0 0
0 0 0 1
0 0 0 0
0 0 0 0
| n31 | property |
public var n31:NumberMatrix4 cell.
0 0 0 0
0 0 0 0
1 0 0 0
0 0 0 0
| n32 | property |
public var n32:NumberMatrix4 cell.
0 0 0 0
0 0 0 0
0 1 0 0
0 0 0 0
| n33 | property |
public var n33:NumberMatrix4 cell.
0 0 0 0
0 0 0 0
0 0 1 0
0 0 0 0
| n34 | property |
public var n34:NumberMatrix4 cell.
0 0 0 0
0 0 0 0
0 0 0 1
0 0 0 0
| n41 | property |
public var n41:NumberMatrix4 cell.
0 0 0 0
0 0 0 0
0 0 0 0
1 0 0 0
| n42 | property |
public var n42:NumberMatrix4 cell.
0 0 0 0
0 0 0 0
0 0 0 0
0 1 0 0
| n43 | property |
public var n43:NumberMatrix4 cell.
0 0 0 0
0 0 0 0
0 0 0 0
0 0 1 0
| n44 | property |
public var n44:NumberMatrix4 cell.
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 1
| USE_FAST_MATH | property |
public static var USE_FAST_MATH:Boolean = falseShould we use fast math.
| Matrix4 | () | constructor |
public function Matrix4(pn11:Number = 1, pn12:Number = 0, pn13:Number = 0, pn14:Number = 0, pn21:Number = 0, pn22:Number = 1, pn23:Number = 0, pn24:Number = 0, pn31:Number = 0, pn32:Number = 0, pn33:Number = 1, pn34:Number = 0, pn41:Number = 0, pn42:Number = 0, pn43:Number = 0, pn44:Number = 1)Creates a new Matrix4 matrix.
If 16 arguments are passed to the constructor, it will create a Matrix4 with the values. Otherwise an identity Matrix4 is created.
var m:Matrix4 = new Matrix4();1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1 var m:Matrix4 = new Matrix4(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16);1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
Parameters
pn11:Number (default = 1) — - pn44 Element values to populate the matrix
|
|
pn12:Number (default = 0) |
|
pn13:Number (default = 0) |
|
pn14:Number (default = 0) |
|
pn21:Number (default = 0) |
|
pn22:Number (default = 1) |
|
pn23:Number (default = 0) |
|
pn24:Number (default = 0) |
|
pn31:Number (default = 0) |
|
pn32:Number (default = 0) |
|
pn33:Number (default = 1) |
|
pn34:Number (default = 0) |
|
pn41:Number (default = 0) |
|
pn42:Number (default = 0) |
|
pn43:Number (default = 0) |
|
pn44:Number (default = 1) |
| addMatrix | () | method |
public final function addMatrix(m2:Matrix4):voidAdds this matrix to a passed in matrix.
This matrix is added to the argument matrix, element by element:
n11 = n11 + m2.n11, etc
m2:Matrix4 — Matrix to add to thei matrix.
|
| axisRotation | () | method |
public final function axisRotation(u:Number, v:Number, w:Number, angle:Number):voidCompute a Rotation around an axis{
Parametersu:Number — { |
|
v:Number — { |
|
w:Number — { |
|
angle:Number — angle of rotation in degree
|
| axisRotationVector | () | method |
public final function axisRotationVector(v:Vector, angle:Number):voidMakes this matrix a rotation matrix for a rotation around a given axis.
The matrix is computed from the angle of rotation around the given axes of rotation.
The axis is given as a 3D vector.
v:Vector — The axis of rotation
|
|
angle:Number — The angle of rotation in degrees
|
| axisRotationWithReference | () | method |
public final function axisRotationWithReference(axis:Vector, ref:Vector, pAngle:Number):voidRealize a rotation around a specific axis through a specified point.
a rotation by a specified angle around a specified axis through a specific position, the reference point, is applied to this matrix.
Parametersaxis:Vector — A 3D Vector representing the axis of rtation. Must be normalized!
|
|
ref:Vector — The reference point.
|
|
pAngle:Number — The angle of rotation in degrees.
|
| clone | () | method |
public final function clone():Matrix4Compute a clonage {
ReturnsMatrix4 —
The result of clonage : a {
|
| copy | () | method |
public final function copy(m:Matrix4):voidMakes this matrix a copy of a passed in matrix.
All elements of the argument matrix are copied into this matrix.
Parametersm:Matrix4 — The matrix to copy.
|
| det | () | method |
public final function det():NumberReturns the determinant of this 4x4 matrix.
ReturnsNumber — The determinant
|
| det3x3 | () | method |
public final function det3x3():NumberReturns the determinant of the upper left 3x3 sub matrix of this matrix.
ReturnsNumber — The determinant
|
| eulerRotation | () | method |
public final function eulerRotation(ax:Number, ay:Number, az:Number):voidCompute a Rotation {
Parametersax:Number — { |
|
ay:Number — { |
|
az:Number — { |
| getEulerAngles | () | method |
public static function getEulerAngles(t:Matrix4):VectorGet the eulers angles from the rotation matrix
Parameterst:Matrix4 — The Matrix4 instance from which t extract these angles
|
Vector —
A vector that represent the Euler angles in the 3D space (X, Y and Z)
|
| getTrace | () | method |
public final function getTrace():NumberReturns the trace of the matrix.
The trace value is the sum of the element on the diagonal of the matrix
ReturnsNumber — The trace value
|
| getTranslation | () | method |
public final function getTranslation():VectorReturns a vector that containes the 3D position information.
ReturnsVector —
A vector
|
| identity | () | method |
public final function identity():voidMakes this matrix into an identity matrix.
A zero Matrix4 is represented like this :
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
| inverse | () | method |
public final function inverse():voidReturn the inverse of the matrix passed in parameter.
| multiply | () | method |
public final function multiply(m2:Matrix4):voidMultiplies this matrix by a passed in matrix.
Parametersm2:Matrix4 — The matrix to multiply with.
|
| multiply3x3 | () | method |
public final function multiply3x3(m2:Matrix4):voidMultiplies this matrix by a passed in as if they were 3x3 matrices.
Parametersm2:Matrix4 — The matrix to multiply with.
|
| multiply4x3 | () | method |
public final function multiply4x3(m2:Matrix4):voidMultiplies the upper left 3x3 sub matrix of this matrix by a passed in matrix.
Parametersm2:Matrix4 — The matrix to multiply with.
|
| rotationX | () | method |
public final function rotationX(angle:Number):voidMakes this matrix a rotation matrix for the given angle of rotation.
Parametersangle:Number — Number angle of rotation in degrees
|
| rotationY | () | method |
public final function rotationY(angle:Number):voidMakes this matrix a rotation matrix for the given angle of rotation.
The matrix is computed from the angle of rotation around the y axes.
Parametersangle:Number — Angle of rotation around y axis in degrees.
|
| rotationZ | () | method |
public final function rotationZ(angle:Number):voidMakes this matrix a rotation matrix for the given angle of rotation.
The matrix is computed from the angle of rotation around the z axes.
Parametersangle:Number — Angle of rotation around z axis in degrees.
|
| scale | () | method |
public final function scale(nXScale:Number, nYScale:Number, nZScale:Number):voidMakes this matrix a scale matrix from scale components.
|Sx 0 0 0| |0 Sy 0 0| |0 0 Sz 0| |0 0 0 1|Parameters
nXScale:Number — x-scale.
|
|
nYScale:Number — y-scale.
|
|
nZScale:Number — z-scale.
|
| scaleVector | () | method |
public final function scaleVector(v:Vector):voidMakes this matrix a scale matrix from a scale vector.
|Sx 0 0 0| |0 Sy 0 0| |0 0 Sz 0| |0 0 0 1|Parameters
v:Vector — The scale vector.
|
| toString | () | method |
public final function toString():StringReturns a string representation of this matrix.
ReturnsString — The string representing this matrix
|
| translation | () | method |
public final function translation(nTx:Number, nTy:Number, nTz:Number):voidMakes this matrix a translation matrix from translation components.
|1 0 0 0| |0 1 0 0| |0 0 1 0| |Tx Ty Tz 1|Parameters
nTx:Number — Translation in the x direction.
|
|
nTy:Number — Translation in the y direction.
|
|
nTz:Number — Translation in the z direction.
|
| translationVector | () | method |
public final function translationVector(v:Vector):voidMakes this matrix a translation matrix from a translation vector.
|1 0 0 0| |0 1 0 0| |0 0 1 0| |v.x v.y v.z 1|Parameters
v:Vector — The translation Vector.
|
| vectorMult | () | method |
public final function vectorMult(pv:Vector):voidMultiplies a vertex with this matrix.
Parameterspv:Vector — The vertex to be mutliplied
|
| vectorMult3x3 | () | method |
public final function vectorMult3x3(pv:Vector):voidMultiplies a 3D vector with this matrix.
The vector is multiplied with te upper left 3x3 sub matrix
Parameterspv:Vector — The vector to be mutliplied
|
| zero | () | method |
public final function zero():voidMakes this matrix into a zero matrix.
A zero Matrix4 is represented like this :
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0