org.jagatoo.loaders.models.ms3d.utils
Class RotationUtils

java.lang.Object
  extended by org.jagatoo.loaders.models.ms3d.utils.RotationUtils

public class RotationUtils
extends java.lang.Object


Constructor Summary
RotationUtils()
           
 
Method Summary
static org.openmali.vecmath2.Tuple3f toEuler(org.openmali.vecmath2.Quaternion4f quaternion)
          Convert a Quaternion to Euler angles (in degrees) Note : the Quaternion can be non-normalized.
static org.openmali.vecmath2.Quaternion4f toQuaternion(float rotX, float rotY, float rotZ)
          Convert Euler angles (in degrees) to a (normalized) Quaternion.
static org.openmali.vecmath2.Quaternion4f toQuaternion(org.openmali.vecmath2.Tuple3f tuple)
          Convert Euler angles (in degrees) to a (normalized) Quaternion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RotationUtils

public RotationUtils()
Method Detail

toQuaternion

public static org.openmali.vecmath2.Quaternion4f toQuaternion(float rotX,
                                                              float rotY,
                                                              float rotZ)
Convert Euler angles (in degrees) to a (normalized) Quaternion.

Parameters:
rotX - Rotation about the X axis, in degrees
rotY - Rotation about the Y axis, in degrees
rotZ - Rotation about the Z axis, in degrees
Returns:
The Quaternion representing the same rotation. author Martin Baker (euclideanspace.com)

toQuaternion

public static org.openmali.vecmath2.Quaternion4f toQuaternion(org.openmali.vecmath2.Tuple3f tuple)
Convert Euler angles (in degrees) to a (normalized) Quaternion.

Parameters:
tuple -
Returns:
teh Quaternion

toEuler

public static org.openmali.vecmath2.Tuple3f toEuler(org.openmali.vecmath2.Quaternion4f quaternion)
Convert a Quaternion to Euler angles (in degrees) Note : the Quaternion can be non-normalized.

Parameters:
quaternion - The quaternion
Returns:
The euler angles (in degrees) author Martin Baker (euclideanspace.com)