Packagecom.transmote.flar.utils.geom
Classpublic class FLARToolkitGeomUtils
InheritanceFLARToolkitGeomUtils Inheritance Object

Collection of FLARToolkit-specific matrix transformation / conversion utils. Includes methods to transform projection matrices for camera/scene setup from a generic Matrix3D to a Matrix3D with data useful for each 3D framework.



Public Methods
 MethodDefined By
  
FLARToolkitGeomUtils
  
calcNyARMatrixRotations(mat:NyARDoubleMatrix34, bInDegrees:Boolean = true):Vector3D
[static] Calculate rotation around X, Y, and Z axes, and return stored in a Vector3D instance.
FLARToolkitGeomUtils
  
[static] Calculate scale in X, Y, and Z dimensions, and return stored in a Vector3D instance.
FLARToolkitGeomUtils
  
calcProjectionMatrix_Alternativa(cameraParams:FLARParam, viewportSize:Rectangle):Matrix3D
[static] Convert FLARToolkit projection matrix to data that can be used by Alternativa to determine scene projection, in order to draw 3D models in correct perspective.
FLARToolkitGeomUtils
  
calcProjectionMatrix_Away(cameraParams:FLARParam, viewportSize:Rectangle):Matrix3D
[static] Convert FLARToolkit projection matrix to data that can be used by Away3D to determine scene projection, in order to draw 3D models in correct perspective.
FLARToolkitGeomUtils
  
calcProjectionMatrix_AwayLite(cameraParams:FLARParam, viewportSize:Rectangle):Matrix3D
[static] Convert FLARToolkit projection matrix to data that can be used by Away3D Lite to determine scene projection, in order to draw 3D models in correct perspective.
FLARToolkitGeomUtils
  
calcProjectionMatrix_Flash(cameraParams:FLARParam, viewportSize:Rectangle):Matrix3D
[static] Convert FLARToolkit projection matrix to data that can be used by native Flash 3D to determine scene projection, in order to draw 3D models in correct perspective.
FLARToolkitGeomUtils
  
calcProjectionMatrix_Papervision(cameraParams:FLARParam, viewportSize:Rectangle):Matrix3D
[static] Convert FLARToolkit projection matrix to data that can be used by Papervision3D to determine scene projection, in order to draw 3D models in correct perspective.
FLARToolkitGeomUtils
  
calcProjectionMatrix_Sandy(cameraParams:FLARParam, viewportSize:Rectangle, NEAR_CLIP:Number = 50, FAR_CLIP:Number = 10000):Matrix3D
[static] Convert FLARToolkit projection matrix to data that can be used by Sandy3D to determine scene projection, in order to draw 3D models in correct perspective.
FLARToolkitGeomUtils
  
convertNyARMatrixToFlashMatrix3D(mat:NyARDoubleMatrix34, bMirror:Boolean = true):Matrix3D
[static] Convert a FLAR matrix to a Flash Matrix3D.
FLARToolkitGeomUtils
  
dumpNyARMatrix(mat:NyARDoubleMatrix34, sd:int = 4):String
[static] Format a FLAR matrix as a String.
FLARToolkitGeomUtils
Constructor Detail
FLARToolkitGeomUtils()Constructor
public function FLARToolkitGeomUtils()



Method Detail
calcNyARMatrixRotations()method
public static function calcNyARMatrixRotations(mat:NyARDoubleMatrix34, 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

mat:NyARDoubleMatrix34
 
bInDegrees:Boolean (default = true)

Returns
Vector3D
calcNyARMatrixScales()method 
public static function calcNyARMatrixScales(mat:NyARDoubleMatrix34):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

mat:NyARDoubleMatrix34

Returns
Vector3D
calcProjectionMatrix_Alternativa()method 
public static function calcProjectionMatrix_Alternativa(cameraParams:FLARParam, viewportSize:Rectangle):Matrix3D

Convert FLARToolkit projection matrix to data that can be used by Alternativa to determine scene projection, in order to draw 3D models in correct perspective. Thanks to Makc for the matrix conversion.

Parameters

cameraParams:FLARParam
 
viewportSize:Rectangle

Returns
Matrix3D
calcProjectionMatrix_Away()method 
public static function calcProjectionMatrix_Away(cameraParams:FLARParam, viewportSize:Rectangle):Matrix3D

Convert FLARToolkit projection matrix to data that can be used by Away3D to determine scene projection, in order to draw 3D models in correct perspective.

Parameters

cameraParams:FLARParam
 
viewportSize:Rectangle

Returns
Matrix3D
calcProjectionMatrix_AwayLite()method 
public static function calcProjectionMatrix_AwayLite(cameraParams:FLARParam, viewportSize:Rectangle):Matrix3D

Convert FLARToolkit projection matrix to data that can be used by Away3D Lite to determine scene projection, in order to draw 3D models in correct perspective. Thanks to Mikael Emtinger for the matrix conversion.

Parameters

cameraParams:FLARParam
 
viewportSize:Rectangle

Returns
Matrix3D
calcProjectionMatrix_Flash()method 
public static function calcProjectionMatrix_Flash(cameraParams:FLARParam, viewportSize:Rectangle):Matrix3D

Convert FLARToolkit projection matrix to data that can be used by native Flash 3D to determine scene projection, in order to draw 3D models in correct perspective. Thanks to Nutsu for the matrix conversion.

Parameters

cameraParams:FLARParam
 
viewportSize:Rectangle

Returns
Matrix3D
calcProjectionMatrix_Papervision()method 
public static function calcProjectionMatrix_Papervision(cameraParams:FLARParam, viewportSize:Rectangle):Matrix3D

Convert FLARToolkit projection matrix to data that can be used by Papervision3D to determine scene projection, in order to draw 3D models in correct perspective.

Parameters

cameraParams:FLARParam
 
viewportSize:Rectangle

Returns
Matrix3D
calcProjectionMatrix_Sandy()method 
public static function calcProjectionMatrix_Sandy(cameraParams:FLARParam, viewportSize:Rectangle, NEAR_CLIP:Number = 50, FAR_CLIP:Number = 10000):Matrix3D

Convert FLARToolkit projection matrix to data that can be used by Sandy3D to determine scene projection, in order to draw 3D models in correct perspective. Thanks to Makc for the matrix conversion.

Parameters

cameraParams:FLARParam
 
viewportSize:Rectangle
 
NEAR_CLIP:Number (default = 50)
 
FAR_CLIP:Number (default = 10000)

Returns
Matrix3D
convertNyARMatrixToFlashMatrix3D()method 
public static function convertNyARMatrixToFlashMatrix3D(mat:NyARDoubleMatrix34, bMirror:Boolean = true):Matrix3D

Convert a FLAR matrix to a Flash Matrix3D.

Parameters

mat:NyARDoubleMatrix34
 
bMirror:Boolean (default = true)

Returns
Matrix3D
dumpNyARMatrix()method 
public static function dumpNyARMatrix(mat:NyARDoubleMatrix34, sd:int = 4):String

Format a FLAR matrix as a String.

Parameters

mat:NyARDoubleMatrix34 — FLAR matrix to return as a String.
 
sd:int (default = 4) — Number of significant digits to display.

Returns
String