| Package | graphics.geom |
| Class | public class Matrix2 |
| Inheritance | Matrix2 Object |
| Implements | Geometry |
Example :
import graphics.geom.Matrix2 ;
var m:Matrix2 = new Matrix2() ;
// 1 0
// 0 1
| Property | Defined By | ||
|---|---|---|---|
| n11 : Number
Defines a Matrix2 cell. | Matrix2 | ||
| n12 : Number
Defines a Matrix2 cell. | Matrix2 | ||
| n21 : Number
Defines a Matrix2 cell. | Matrix2 | ||
| n22 : Number
Defines a Matrix2 cell. | Matrix2 | ||
| Method | Defined By | ||
|---|---|---|---|
Matrix2(... arguments)
Creates a new Matrix2 instance. | Matrix2 | ||
angle():Number
Indicates the angle value of the specified Matrix2 object. | Matrix2 | ||
clone():*
Returns a shallow copy of this instance. | Matrix2 | ||
equals(o:*):Boolean
Compares the specified object with this object for equality. | Matrix2 | ||
getEntry(x:Number, y:Number):*
Returns the matrix[x][y] value. | Matrix2 | ||
[static]
Creates and returns a new Matrix2 with all this elements are 0. | Matrix2 | ||
identity():void
Transforms the matrix in this identity representation. | Matrix2 | ||
[static]
Creates and returns a new identity Matrix2. | Matrix2 | ||
Invert the Matrix2 object. | Matrix2 | ||
isIdentity():Boolean
Returns true if the Matrix2 is the identity. | Matrix2 | ||
setByAngle(angle:Number):void
Sets the specified matrix with the passed-in angle value. | Matrix2 | ||
setByMatrix(matrix:Matrix2):void
Sets the specified matrix with the Matrix2 reference passed in argument. | Matrix2 | ||
Sets the specified matrix with the two passed-in Vector2 objects. | Matrix2 | ||
setEntry(x:Number, y:Number, value:*):void
Sets matrix[x][y] with the specified value. | Matrix2 | ||
toArray():Array
Returns the Array representation of this instance. | Matrix2 | ||
toObject():Object
Returns the Object representation of this object. | Matrix2 | ||
toSource(indent:int = 0):String
Returns the source code string representation of the object. | Matrix2 | ||
toString():String
Returns the string representation of the object. | Matrix2 | ||
| n11 | property |
public var n11:Number
Defines a Matrix2 cell.
1 0
0 0
| n12 | property |
public var n12:Number
Defines a Matrix2 cell.
0 1
0 0
| n21 | property |
public var n21:Number
Defines a Matrix2 cell.
0 0
1 0
| n22 | property |
public var n22:Number
Defines a Matrix2 cell.
0 0
0 1
| Matrix2 | () | Constructor |
public function Matrix2(... arguments)
Creates a new Matrix2 instance.
... arguments |
| angle | () | method |
public function angle():NumberIndicates the angle value of the specified Matrix2 object.
ReturnsNumber |
| clone | () | method |
public function clone():*Returns a shallow copy of this instance.
Example :
import graphics.geom.Matrix2 ;
var m:Matrix2 = new Matrix2( 1, 2, 3, 4 ) ;
trace( m + " clone() : " + m.clone() ) ;
Returns* — a shallow copy of this instance.
|
| equals | () | method |
public function equals(o:*):BooleanCompares the specified object with this object for equality.
Parameters
o:* |
Boolean — true 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.
Example :
import graphics.geom.Matrix2 ;
var m:Matrix2 = new Matrix2( 1, 2, 3, 4 ) ;
trace( m + " getEntry(1,0) : " + m.getEntry(1,0) ) ; // [Matrix2:[1,2],[3,4]] getEntry(1,0) : 3
Parameters
x:Number | |
y:Number |
* — the matrix[x][y] value.
|
| getZero | () | method |
public static function getZero():Matrix2Creates and returns a new Matrix2 with all this elements are 0.
Example :
import graphics.geom.Matrix2 ;
var m:Matrix2 = Matrix2.getZero() ;
// 0 0
// 0 0
ReturnsMatrix2 — a new zero Matrix4 object.
|
| identity | () | method |
public function identity():voidTransforms the matrix in this identity representation.
Example :
import graphics.geom.Matrix2 ;
var m:Matrix2 = new Matrix2( 1, 2, 3, 4 ) ;
m.identity() ;
trace( m + " identity : " + m ) ;
| identity | () | method |
public static function identity():Matrix2Creates and returns a new identity Matrix2.
Example :
import graphics.geom.Matrix2 ;
var m:Matrix2 = Matrix2.identity() ;
// 1 0
// 0 1
ReturnsMatrix2 — a new identity Matrix2 object.
|
| invert | () | method |
public function invert(out:Matrix2 = null):Matrix2Invert the Matrix2 object.
Parameters
out:Matrix2 (default = null) — The optional Matrix2 reference to return. If this argument is null a new identity Matrix is created.
|
Matrix2 |
| isIdentity | () | method |
public function isIdentity():Boolean
Returns true if the Matrix2 is the identity.
Example :
import graphics.geom.Matrix2 ;
var m:Matrix2 ;
m = new Matrix2() ;
trace( m.isIdentify() ) ; // true
m = new Matrix2(1,2,3,4) ;
trace( m.isIdentify() ) ; // false
ReturnsBoolean — true if the Matrix2 is the identity.
|
| setByAngle | () | method |
public function setByAngle(angle:Number):voidSets the specified matrix with the passed-in angle value.
Parameters
angle:Number |
| setByMatrix | () | method |
public function setByMatrix(matrix:Matrix2):voidSets the specified matrix with the Matrix2 reference passed in argument.
Parameters
matrix:Matrix2 — The matrix to fill the current matrix.
|
| setByVector | () | method |
public function setByVector(v1:Vector2, v2:Vector2):voidSets the specified matrix with the two passed-in Vector2 objects. The first vector is the first column of the matrix and the second the other.
Parameters
v1:Vector2 | |
v2:Vector2 |
| setEntry | () | method |
public function setEntry(x:Number, y:Number, value:*):voidSets matrix[x][y] with the specified value.
Example :
import graphics.geom.Matrix2 ;
var m:Matrix2 = new Matrix2( 1, 2, 3, 4 ) ;
m.setEntry( 1 , 0 , 5 ) ; // [Matrix2:[1,2],[5,4]]
trace( m ) ;
Parameters
x:Number | |
y:Number | |
value:* |
| toArray | () | method |
public function toArray():ArrayReturns the Array representation of this instance.
Example :
import graphics.geom.Matrix2 ;
var m:Matrix2 = new Matrix2( 1, 2, 3, 4 ) ;
var a:Array = m.toArray() ;
trace( m + " toArray() : [" + a.join(",") + "]" ) ;
ReturnsArray — the Array representation of this instance.
|
| toObject | () | method |
public function toObject():ObjectReturns the Object representation of this object.
Example :
import graphics.geom.Matrix2 ;
import system.eden ;
var m:Matrix2 = new Matrix2( 1, 2, 3, 4 ) ;
var o:Object = m.toObject() ;
trace( m + " toObject() : " + eden.serialize(o) ) ;
ReturnsObject — the Object representation of this object.
|
| toSource | () | method |
public function toSource(indent:int = 0):StringReturns the source code string representation of the object.
Example :
import graphics.geom.Matrix2 ;
import system.eden ;
var m:Matrix2 = new Matrix2( 1, 2, 3, 4 ) ;
trace( m + " toSource() : " + m.toSource() ) ; // new graphics.geom.Matrix2(1,2,3,4)
Parameters
indent:int (default = 0) |
String — the source code string representation of the object.
|
| toString | () | method |
public function toString():StringReturns the string representation of the object.
ReturnsString — the string representation of the object.
|