Packagegraphics.geom
Classpublic class Matrixs4
InheritanceMatrixs4 Inheritance Object

Static tool class to manipulate and transform Matrix4 references.



Public Methods
 MethodDefined By
  
[static] Creates and returns a new identity Matrix4.
Matrixs4
  
[static] Creates and returns a new Matrix4 with all this elements are 0.
Matrixs4
  
isIdentity(m:Matrix4):Boolean
[static] Returns true if the Matrix4 is the identity.
Matrixs4
  
[static] Sets the specified matrix with the Matrix4 reference passed in argument.
Matrixs4
  
[static] Sets the specified matrix with the Quaternion reference passed in argument.
Matrixs4
Method Detail
getIdentity()method
public static function getIdentity():Matrix4

Creates and returns a new identity Matrix4.

Example :

import graphics.geom.Matrix4 ; import graphics.util.Matrix4Util ; var m:Matrix4 = Matrix4Util.getIdentity() ; // 1 0 0 0 // 0 1 0 0 // 0 0 1 0 // 0 0 0 1

Returns
Matrix4 — a new identity Matrix4 object.
getZero()method 
public static function getZero():Matrix4

Creates and returns a new Matrix4 with all this elements are 0.

Example :

import graphics.geom.Matrix4 ; import graphics.util.Matrix4Util ; var m:Matrix4 = Matrix4Util.getZero() ; // 0 0 0 0 // 0 0 0 0 // 0 0 0 0 // 0 0 0 0

Returns
Matrix4 — a new zero Matrix4 object.
isIdentity()method 
public static function isIdentity(m:Matrix4):Boolean

Returns true if the Matrix4 is the identity.

Example :

import graphics.geom.Matrix4 ; import graphics.util.Matrix4Util ; var m:Matrix4 = new Matrix4() ; var result:Boolean = Matrix4Util.isIdentity( m ) ; trace(result) ; // true var m:Matrix4 = new Matrix4(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16) ; var result:Boolean = Matrix4Util.isIdentity( m ) ; trace(result) ; // false

Parameters

m:Matrix4

Returns
Booleantrue if the Matrix4 is the identity.
setByMatrix()method 
public static function setByMatrix(m1:Matrix4, m2:Matrix4):Matrix4

Sets the specified matrix with the Matrix4 reference passed in argument.

Parameters

m1:Matrix4 — the first Matrix4 reference to fill.
 
m2:Matrix4 — the second Matrix4 reference.

Returns
Matrix4
setByQuaternion()method 
public static function setByQuaternion(q:Quaternion, m:Matrix4 = null):Matrix4

Sets the specified matrix with the Quaternion reference passed in argument.

Parameters

q:Quaternion — the Quaternion reference.
 
m:Matrix4 (default = null) — the Matrix4 reference to fill.

Returns
Matrix4