Packageaway3d.core.math
Classpublic final class Matrix3D

A 3D transformation 4x4 matrix

Public Properties
 PropertyDefined by
  det : Number
[read-only] Returns the 3d matrix object's determinant.
Matrix3D
  det4x4 : Number
[read-only]
Matrix3D
  forward : Number3D
Returns a Number3D representing the forward vector of this matrix.
Matrix3D
  position : Number3D
[read-only] Returns a 3d number representing the translation imposed by the 3dmatrix.
Matrix3D
  right : Number3D
Returns a Number3D representing the right vector of this matrix.
Matrix3D
  swx : Number = 0
The value in the 4th row and first column of the Matrix object, --
Matrix3D
  swy : Number = 0
The value in the 4th row and second column of the Matrix object, --
Matrix3D
  swz : Number = 0
The value in the 4th row and third column of the Matrix object, --
Matrix3D
  sxx : Number = 1
The value in the first row and first column of the Matrix object, which affect the rotation and scaling of a 3d object.
Matrix3D
  sxy : Number = 0
The value in the first row and second column of the Matrix object, which affect the rotation and scaling of a 3d object.
Matrix3D
  sxz : Number = 0
The value in the first row and third column of the Matrix object, which affect the rotation and scaling of a 3d object.
Matrix3D
  syx : Number = 0
The value in the second row and first column of the Matrix object, which affect the rotation and scaling of a 3d object.
Matrix3D
  syy : Number = 1
The value in the second row and second column of the Matrix object, which affect the rotation and scaling of a 3d object.
Matrix3D
  syz : Number = 0
The value in the second row and third column of the Matrix object, which affect the rotation and scaling of a 3d object.
Matrix3D
  szx : Number = 0
The value in the third row and first column of the Matrix object, which affects the rotation and scaling of a 3d object.
Matrix3D
  szy : Number = 0
The value in the third row and second column of the Matrix object, which affect the rotation and scaling of a 3d object.
Matrix3D
  szz : Number = 1
The value in the third row and third column of the Matrix object, which affect the rotation and scaling of a 3d object.
Matrix3D
  tw : Number = 1
The value in the 4th row and 4th column of the Matrix object, --
Matrix3D
  tx : Number = 0
The value in the first row and forth column of the Matrix object, which affects the positioning along the x axis of a 3d object.
Matrix3D
  ty : Number = 0
The value in the second row and fourth column of the Matrix object, which affects the positioning along the y axis of a 3d object.
Matrix3D
  tz : Number = 0
The value in the third row and fourth column of the Matrix object, which affects the positioning along the z axis of a 3d object.
Matrix3D
  up : Number3D
Returns a Number3D representing the up vector of this matrix.
Matrix3D
Public Methods
 MethodDefined by
  
Creates a new Matrix3D object.
Matrix3D
  
array2matrix(ar:Array, yUp:Boolean, scaling:Number):void
Fills the 3d matrix object with values from an array with 3d matrix values ordered from right to left and up to down.
Matrix3D
  
clear():void
Clears the 3d matrix object and fills it with the identity matrix.
Matrix3D
  
Fill the 3d matrix with all matrix values of the given 3d matrix.
Matrix3D
  
compare(m:Matrix3D):Boolean
Matrix3D
  
Fill the 3d matrix with the 3x3 rotation matrix section of the given 3d matrix.
Matrix3D
  
inverse(m:Matrix3D):void
Fills the 3d matrix object with the result from the inverse 3x3 calulation of the given 3d matrix.
Matrix3D
  
Fills the 3d matrix object with the result from the inverse 4x4 calulation of the given 3d matrix.
Matrix3D
  
multiply(m1:Matrix3D, m2:Matrix3D):void
Fills the 3d matrix object with the result from a 3x4 multipication of two 3d matrix objects.
Matrix3D
  
Fills the 3d matrix object with the result from a 3x3 multipication of two 3d matrix objects.
Matrix3D
  
Fills the 3d matrix object with the result from a 4x3 multipication of two 3d matrix objects.
Matrix3D
  
Fills the 3d matrix object with the result from a 4x4 multipication of two 3d matrix objects.
Matrix3D
  
Matrix3D
  
normalize(m1:Matrix3D):void
normalizes the axis vectors of the given 3d matrix.
Matrix3D
  
orthographicProjectionMatrix(left:Number, right:Number, bottom:Number, top:Number, near:Number, far:Number):void
Fills the 3d matrix with a 4x4 transformation that produces an orthographic projection.
Matrix3D
  
perspectiveProjectionMatrix(fov:Number, aspect:Number, near:Number, far:Number):void
Fills the 3d matrix with a 4x4 transformation that produces a perspective projection.
Matrix3D
  
quaternion2matrix(quarternion:Quaternion):void
Fills the 3d matrix object with values representing the transformation made by the given quaternion.
Matrix3D
  
rotationMatrix(u:Number, v:Number, w:Number, angle:Number):void
Fills the 3d matrix object with values representing the given rotation around a vector.
Matrix3D
  
scale(m1:Matrix3D, x:Number, y:Number, z:Number):void
Scales the 3d matrix by the given amount in each dimension
Matrix3D
  
scaleMatrix(u:Number, v:Number, w:Number):void
Fills the 3d matrix object with values representing the given scaling.
Matrix3D
  
toString():String
Used to trace the values of a 3d matrix.
Matrix3D
  
translationMatrix(u:Number, v:Number, w:Number):void
Fills the 3d matrix object with values representing the given translation.
Matrix3D
Property detail
detproperty
det:Number  [read-only]

Returns the 3d matrix object's determinant.

Implementation
    public function get det():Number
det4x4property 
det4x4:Number  [read-only]Implementation
    public function get det4x4():Number
forwardproperty 
forward:Number3D  [read-write]

Returns a Number3D representing the forward vector of this matrix.

Implementation
    public function get forward():Number3D
    public function set forward(value:Number3D):void
positionproperty 
position:Number3D  [read-only]

Returns a 3d number representing the translation imposed by the 3dmatrix.

Implementation
    public function get position():Number3D
rightproperty 
right:Number3D  [read-write]

Returns a Number3D representing the right vector of this matrix.

Implementation
    public function get right():Number3D
    public function set right(value:Number3D):void
swxproperty 
public var swx:Number = 0

The value in the 4th row and first column of the Matrix object, --

swyproperty 
public var swy:Number = 0

The value in the 4th row and second column of the Matrix object, --

swzproperty 
public var swz:Number = 0

The value in the 4th row and third column of the Matrix object, --

sxxproperty 
public var sxx:Number = 1

The value in the first row and first column of the Matrix object, which affect the rotation and scaling of a 3d object.

sxyproperty 
public var sxy:Number = 0

The value in the first row and second column of the Matrix object, which affect the rotation and scaling of a 3d object.

sxzproperty 
public var sxz:Number = 0

The value in the first row and third column of the Matrix object, which affect the rotation and scaling of a 3d object.

syxproperty 
public var syx:Number = 0

The value in the second row and first column of the Matrix object, which affect the rotation and scaling of a 3d object.

syyproperty 
public var syy:Number = 1

The value in the second row and second column of the Matrix object, which affect the rotation and scaling of a 3d object.

syzproperty 
public var syz:Number = 0

The value in the second row and third column of the Matrix object, which affect the rotation and scaling of a 3d object.

szxproperty 
public var szx:Number = 0

The value in the third row and first column of the Matrix object, which affects the rotation and scaling of a 3d object.

szyproperty 
public var szy:Number = 0

The value in the third row and second column of the Matrix object, which affect the rotation and scaling of a 3d object.

szzproperty 
public var szz:Number = 1

The value in the third row and third column of the Matrix object, which affect the rotation and scaling of a 3d object.

twproperty 
public var tw:Number = 1

The value in the 4th row and 4th column of the Matrix object, --

txproperty 
public var tx:Number = 0

The value in the first row and forth column of the Matrix object, which affects the positioning along the x axis of a 3d object.

typroperty 
public var ty:Number = 0

The value in the second row and fourth column of the Matrix object, which affects the positioning along the y axis of a 3d object.

tzproperty 
public var tz:Number = 0

The value in the third row and fourth column of the Matrix object, which affects the positioning along the z axis of a 3d object.

upproperty 
up:Number3D  [read-write]

Returns a Number3D representing the up vector of this matrix.

Implementation
    public function get up():Number3D
    public function set up(value:Number3D):void
Constructor detail
Matrix3D()constructor
public function Matrix3D() Init Parameters
Method detail
array2matrix()method
public function array2matrix(ar:Array, yUp:Boolean, scaling:Number):void

Fills the 3d matrix object with values from an array with 3d matrix values ordered from right to left and up to down.

Parameters
ar:Array
 
yUp:Boolean
 
scaling:Number
clear()method 
public function clear():void

Clears the 3d matrix object and fills it with the identity matrix.

clone()method 
public function clone(m:Matrix3D):Matrix3D

Fill the 3d matrix with all matrix values of the given 3d matrix.

Parameters
m:Matrix3D — The 3d matrix to copy from.

Returns
Matrix3D
compare()method 
public function compare(m:Matrix3D):Boolean Parameters
m:Matrix3D

Returns
Boolean
copy3x3()method 
public function copy3x3(m:Matrix3D):Matrix3D

Fill the 3d matrix with the 3x3 rotation matrix section of the given 3d matrix.

Parameters
m:Matrix3D — The 3d matrix to copy from.

Returns
Matrix3D
inverse()method 
public function inverse(m:Matrix3D):void

Fills the 3d matrix object with the result from the inverse 3x3 calulation of the given 3d matrix.

Parameters
m:Matrix3D — The 3d matrix object used for the inverse calulation.
inverse4x4()method 
public function inverse4x4(m:Matrix3D):void

Fills the 3d matrix object with the result from the inverse 4x4 calulation of the given 3d matrix.

Parameters
m:Matrix3D — The 3d matrix object used for the inverse calulation.
multiply()method 
public function multiply(m1:Matrix3D, m2:Matrix3D):void

Fills the 3d matrix object with the result from a 3x4 multipication of two 3d matrix objects.

Parameters
m1:Matrix3D — The first 3d matrix in the multipication.
 
m2:Matrix3D
multiply3x3()method 
public function multiply3x3(m1:Matrix3D, m2:Matrix3D):void

Fills the 3d matrix object with the result from a 3x3 multipication of two 3d matrix objects. The translation values are taken from the first matrix.

Parameters
m1:Matrix3D — The first 3d matrix in the multipication.
 
m2:Matrix3D
multiply4x3()method 
public function multiply4x3(m1:Matrix3D, m2:Matrix3D):void

Fills the 3d matrix object with the result from a 4x3 multipication of two 3d matrix objects.

Parameters
m1:Matrix3D — The first 3d matrix in the multipication.
 
m2:Matrix3D
multiply4x4()method 
public function multiply4x4(m1:Matrix3D, m2:Matrix3D):void

Fills the 3d matrix object with the result from a 4x4 multipication of two 3d matrix objects.

Parameters
m1:Matrix3D — The first 3d matrix in the multipication.
 
m2:Matrix3D
multiplyVector3x3()method 
public function multiplyVector3x3(v:Number3D):void Parameters
v:Number3D
normalize()method 
public function normalize(m1:Matrix3D):void

normalizes the axis vectors of the given 3d matrix.

Parameters
m1:Matrix3D — The 3d matrix object used for the normalize calulation.
orthographicProjectionMatrix()method 
public function orthographicProjectionMatrix(left:Number, right:Number, bottom:Number, top:Number, near:Number, far:Number):void

Fills the 3d matrix with a 4x4 transformation that produces an orthographic projection.

Parameters
left:Number
 
right:Number
 
bottom:Number
 
top:Number
 
near:Number
 
far:Number
perspectiveProjectionMatrix()method 
public function perspectiveProjectionMatrix(fov:Number, aspect:Number, near:Number, far:Number):void

Fills the 3d matrix with a 4x4 transformation that produces a perspective projection.

Parameters
fov:Number
 
aspect:Number
 
near:Number
 
far:Number
quaternion2matrix()method 
public function quaternion2matrix(quarternion:Quaternion):void

Fills the 3d matrix object with values representing the transformation made by the given quaternion.

Parameters
quarternion:Quaternion — The quarterion object to convert.
rotationMatrix()method 
public function rotationMatrix(u:Number, v:Number, w:Number, angle:Number):void

Fills the 3d matrix object with values representing the given rotation around a vector.

Parameters
u:Number — The x value of the rotation vector.
 
v:Number — The y value of the rotation vector.
 
w:Number — The z value of the rotation vector.
 
angle:Number — The angle in radians of the rotation.
scale()method 
public function scale(m1:Matrix3D, x:Number, y:Number, z:Number):void

Scales the 3d matrix by the given amount in each dimension

Parameters
m1:Matrix3D — The 3d matrix to scale from.
 
x:Number — The scale value along the x axis.
 
y:Number — The scale value along the y axis.
 
z:Number — The scale value along the z axis.
scaleMatrix()method 
public function scaleMatrix(u:Number, v:Number, w:Number):void

Fills the 3d matrix object with values representing the given scaling.

Parameters
u:Number — The scale along the x axis.
 
v:Number — The scale along the y axis.
 
w:Number — The scale along the z axis..
toString()method 
public function toString():String

Used to trace the values of a 3d matrix.

Returns
String — A string representation of the 3d matrix object.
translationMatrix()method 
public function translationMatrix(u:Number, v:Number, w:Number):void

Fills the 3d matrix object with values representing the given translation.

Parameters
u:Number — The translation along the x axis.
 
v:Number — The translation along the y axis.
 
w:Number — The translation along the z axis..
Wiki link
Click to go to the wiki page for 'away3d.core.math.Matrix3D'

Code examples

Comments