Packageaway3d.core.math
Classpublic class Vector3DUtils

Public Methods
 MethodDefined by
  
getAngle(w:Vector3D, q:Vector3D):Number
[static] Returns the angle in radians made between the 3d number obejct and the given Vector3D object.
Vector3DUtils
  
matrix2euler(m1:Matrix3D):Vector3D
[static] Returns a Vector3D object with the euler angles represented by the 3x3 matrix rotation of the given Matrix3D object.
Vector3DUtils
  
matrix2scale(m:Matrix3D):Vector3D
[static] Returns a Vector3D object containing the scale values represented by the given Matrix3D object.
Vector3DUtils
  
quaternion2euler(quarternion:Quaternion):Vector3D
[static] Returns a Vector3D object containing the euler angles represented by the given Quaternion object.
Vector3DUtils
  
rotate(v:Vector3D, m:Matrix3D, vHolder:Vector3D = null):Vector3D
[static] Fills the Vector3D object with the result of a Matrix3D rotation.
Vector3DUtils
Method detail
getAngle()method
public static function getAngle(w:Vector3D, q:Vector3D):Number

Returns the angle in radians made between the 3d number obejct and the given Vector3D object.

Parameters
w:Vector3D — The first 3d number object to use in the calculation.
 
q:Vector3D — The first 3d number object to use in the calculation.

Returns
Number — An angle in radians representing the angle between the two Vector3D objects.
matrix2euler()method 
public static function matrix2euler(m1:Matrix3D):Vector3D

Returns a Vector3D object with the euler angles represented by the 3x3 matrix rotation of the given Matrix3D object.

Parameters
m1:Matrix3D — The 3d matrix object to use in the calculation.

Returns
Vector3D — A 3d vector representing the euler angles extracted from the 3d matrix.
matrix2scale()method 
public static function matrix2scale(m:Matrix3D):Vector3D

Returns a Vector3D object containing the scale values represented by the given Matrix3D object.

Parameters
m:Matrix3D — The 3d matrix object to use in the calculation.

Returns
Vector3D — A 3d vector representing the axis scale values extracted from the 3d matrix.
quaternion2euler()method 
public static function quaternion2euler(quarternion:Quaternion):Vector3D

Returns a Vector3D object containing the euler angles represented by the given Quaternion object.

Parameters
quarternion:Quaternion — The quaternion object to use in the calculation.

Returns
Vector3D — A 3d vector representing the euler angles extracted from the quaternion.
rotate()method 
public static function rotate(v:Vector3D, m:Matrix3D, vHolder:Vector3D = null):Vector3D

Fills the Vector3D object with the result of a Matrix3D rotation.

Parameters
v:Vector3D — The Vector3D to be rotated.
 
m:Matrix3D — The Matrix3D object to use in the calculation.
 
vHolder:Vector3D (default = null) — [optional] The Vector3D that will be used for the result

Returns
Vector3D
Wiki link
Click to go to the wiki page for 'away3d.core.math.Vector3DUtils'

Code examples

Comments