Packagepegas.geom
Classpublic class Matrix4
ImplementsGeometry

Matrix with 4 rows and 4 columns.


Example
     import pegas.geom.Matrix4 ;
     var m:Matrix4 = new Matrix4() ;
     // 1 0 0 0
     // 0 1 0 0
     // 0 0 1 0
     // 0 0 0 1
     



Public Properties
 PropertyDefined by
  n11 : Number
Defines a Matrix4 cell.
Matrix4
  n12 : Number
Defines a Matrix4 cell.
Matrix4
  n13 : Number
Defines a Matrix4 cell.
Matrix4
  n14 : Number
Defines a Matrix4 cell.
Matrix4
  n21 : Number
Defines a Matrix4 cell.
Matrix4
  n22 : Number
Defines a Matrix4 cell.
Matrix4
  n23 : Number
Defines a Matrix4 cell.
Matrix4
  n24 : Number
Defines a Matrix4 cell.
Matrix4
  n31 : Number
Defines a Matrix4 cell.
Matrix4
  n32 : Number
Defines a Matrix4 cell.
Matrix4
  n33 : Number
Defines a Matrix4 cell.
Matrix4
  n34 : Number
Defines a Matrix4 cell.
Matrix4
  n41 : Number
Defines a Matrix4 cell.
Matrix4
  n42 : Number
Defines a Matrix4 cell.
Matrix4
  n43 : Number
Defines a Matrix4 cell.
Matrix4
  n44 : Number
Defines a Matrix4 cell.
Matrix4
Public Methods
 MethodDefined by
  
Matrix4(... arguments)
Creates a new Matrix4 instance.
Matrix4
  
clone():*
Returns a shallow copy of this instance.
Matrix4
  
equals(o:*):Boolean
Compares the specified object with this object for equality.
Matrix4
  
getEntry(x:Number, y:Number):*
Returns the matrix[x][y] value.
Matrix4
  
identity():void
Transforms the specified Matrix4 in argument in the identity Matrix4.
Matrix4
  
setEntry(x:Number, y:Number, value:*):void
Sets matrix[x][y] with the specified value.
Matrix4
  
toArray():Array
Returns the Array representation of this instance.
Matrix4
  
toObject():Object
Returns the Object representation of this object.
Matrix4
  
toSource(indent:int = 0):String
Returns the source code string representation of the object.
Matrix4
  
toString():String
Returns the string representation of the object.
Matrix4
Property detail
n11property
public var n11:Number

Defines a Matrix4 cell.

         1 0 0 0
         0 0 0 0
         0 0 0 0
         0 0 0 0 
         

n12property 
public var n12:Number

Defines a Matrix4 cell.

         0 1 0 0
         0 0 0 0
         0 0 0 0
         0 0 0 0
         

n13property 
public var n13:Number

Defines a Matrix4 cell.

         0 0 1 0
         0 0 0 0
         0 0 0 0
         0 0 0 0
         

n14property 
public var n14:Number

Defines a Matrix4 cell.

         0 0 0 1
         0 0 0 0
         0 0 0 0
         0 0 0 0
         

n21property 
public var n21:Number

Defines a Matrix4 cell.

         0 0 0 0
         1 0 0 0
         0 0 0 0
         0 0 0 0
         

n22property 
public var n22:Number

Defines a Matrix4 cell.

         0 0 0 0
         0 1 0 0
         0 0 0 0
         0 0 0 0
         

n23property 
public var n23:Number

Defines a Matrix4 cell.

         0 0 0 0
         0 0 1 0
         0 0 0 0
         0 0 0 0
         

n24property 
public var n24:Number

Defines a Matrix4 cell. 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0

n31property 
public var n31:Number

Defines a Matrix4 cell.

         0 0 0 0
         0 0 0 0
         1 0 0 0
         0 0 0 0
         

n32property 
public var n32:Number

Defines a Matrix4 cell.

         0 0 0 0
         0 0 0 0
         0 1 0 0
         0 0 0 0
         

n33property 
public var n33:Number

Defines a Matrix4 cell.

         0 0 0 0
         0 0 0 0
         0 0 1 0
         0 0 0 0
         

n34property 
public var n34:Number

Defines a Matrix4 cell.

         0 0 0 0
         0 0 0 0
         0 0 0 1
           0 0 0 0
         

n41property 
public var n41:Number

Defines a Matrix4 cell.

         0 0 0 0
         0 0 0 0
         0 0 0 0
         1 0 0 0
         

n42property 
public var n42:Number

Defines a Matrix4 cell.

         0 0 0 0
         0 0 0 0
         0 0 0 0
         0 1 0 0
         

n43property 
public var n43:Number

Defines a Matrix4 cell.

         0 0 0 0
         0 0 0 0
         0 0 0 0
         0 0 1 0
         

n44property 
public var n44:Number

Defines a Matrix4 cell.

         0 0 0 0
         0 0 0 0
         0 0 0 0
         0 0 0 1
         

Constructor detail
Matrix4()constructor
public function Matrix4(... arguments)

Creates a new Matrix4 instance.

If 16 arguments are passed to the constructor, it will create a Matrix4 with the values.

In the other case, a identity Matrix4 is created.

Example 1 - Matrix4 identity :

         import pegas.geom.Matrix4 ;
         var m:Matrix4 = new Matrix4() ;
         // 1 0 0 0
         // 0 1 0 0
         // 0 0 1 0
         // 0 0 0 1
         

Example 2 - Matrix4 with 16 arguments :

         import pegas.geom.Matrix4 ;
         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
... arguments
Method detail
clone()method
public function clone():*

Returns a shallow copy of this instance.

Returns
* — a shallow copy of this instance.
equals()method 
public function equals(o:*):Boolean

Compares the specified object with this object for equality.

Parameters
o:*

Returns
Booleantrue if the the specified object is equal with this object.
getEntry()method 
public function getEntry(x:Number, y:Number):*

Returns the matrix[x][y] value.

Parameters
x:Number
 
y:Number

Returns
* — the matrix[x][y] value.
identity()method 
public function identity():void

Transforms the specified Matrix4 in argument in the identity Matrix4.

setEntry()method 
public function setEntry(x:Number, y:Number, value:*):void

Sets matrix[x][y] with the specified value.

Parameters
x:Number
 
y:Number
 
value:*
toArray()method 
public function toArray():Array

Returns the Array representation of this instance.

Returns
Array — the Array representation of this instance.
toObject()method 
public function toObject():Object

Returns the Object representation of this object.

Returns
Object — the Object representation of this object.
toSource()method 
public function toSource(indent:int = 0):String

Returns the source code string representation of the object.

Parameters
indent:int (default = 0)

Returns
String — the source code string representation of the object.
toString()method 
public function toString():String

Returns the string representation of the object.

Returns
String — the string representation of the object.