collection of utils used for FLAR matrix transformation / conversion.
public function FLARGeomUtils()
public static function calcFLARMatrixRotations(fm:FLARDoubleMatrix34, bInDegrees:Boolean = true):Vector3D
calculate rotation around X, Y, and Z axes,
and return stored in a Vector3D instance.
NOTE: does not account for scale, as FLARToolkit matrices always scale equally in all three dimensons.
Parameters
| fm:FLARDoubleMatrix34 |
|
| bInDegrees:Boolean (default = true )
|
Returns
public static function calcFLARMatrixScales(fm:FLARDoubleMatrix34):Vector3D
calculate scale in X, Y, and Z dimensions,
and return stored in a Vector3D instance.
NOTE: FLARToolkit matrices should always scale equally in all three dimensions,
so this method is not likely to be useful. but, it's here now, so here it stays.
Parameters
Returns
public static function convertFLARMatrixToFlashMatrix(fm:FLARDoubleMatrix34, scale:Number = 1.0):Matrix3D
convert a FLAR matrix to a Flash Matrix.
Parameters
| fm:FLARDoubleMatrix34 |
|
| scale:Number (default = 1.0 )
|
Returns
public static function createFLARIdentityMatrix():FLARDoubleMatrix34
create an identity matrix as a FLARDoubleMatrix34.
Returns
public static function createFLARIdentityTransMat():FLARTransMatResult
create an identity matrix as a FLARTransMatResult.
Returns
public static function dumpFLARMatrix(fm:FLARDoubleMatrix34, sd:int = 4):String
format a FLAR matrix as a String.
Parameters
| fm:FLARDoubleMatrix34 — FLAR matrix to return as a String.
|
|
| sd:int (default = 4 ) — number of significant digits to display.
|
Returns
public static function dumpMatrix3D(matrix:Matrix3D, sd:int = 4):String
Format Flash matrix as a String.
Parameters
| matrix:Matrix3D — matrix to return as a String.
|
|
| sd:int (default = 4 ) — number of significant digits to display.
|
Returns
By Eric Socolofsky, http://transmote.com. Released under the GNU GPL.