Class Quat

java.lang.Object
  |
  +--javax.vecmath.Tuple4f
        |
        +--javax.vecmath.Quat4f
              |
              +--Quat
All Implemented Interfaces:
java.io.Serializable

public class Quat
extends javax.vecmath.Quat4f

A class for dealing with quaternions based on the java3d quat4d class.

Note: Flock of birds quaternions come in the following order:
w x y z;

while this class may expect arguments in this order:
x y z w.

See Also:
Quat4f, Serialized Form

Fields inherited from class javax.vecmath.Quat4f
EPS, PIO2, serialVersionUID
 
Fields inherited from class javax.vecmath.Tuple4f
w, x, y, z
 
Constructor Summary
(package private) Quat()
           
(package private) Quat(float xx, float yy, float zz, float ww)
           
 
Method Summary
 void getAxisAngle(float[] aa)
          Calculates the axis-angle representation of this rotation, and copies the value into aa.
static Quat transformq0Toq1(Quat q0, Quat q1)
          Calculates the transformation that would take this quaternion (q0)to the given quaternion (q1).
 
Methods inherited from class javax.vecmath.Quat4f
conjugate, conjugate, interpolate, interpolate, inverse, inverse, mul, mul, mulInverse, mulInverse, normalize, normalize, set, set, set, set, set, set
 
Methods inherited from class javax.vecmath.Tuple4f
absolute, absolute, add, add, clamp, clamp, clampMax, clampMax, clampMin, clampMin, epsilonEquals, equals, equals, get, get, hashCode, interpolate, interpolate, negate, negate, scale, scale, scaleAdd, scaleAdd, set, set, set, set, sub, sub, toString
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Constructor Detail

Quat

Quat()

Quat

Quat(float xx,
     float yy,
     float zz,
     float ww)
Method Detail

transformq0Toq1

public static Quat transformq0Toq1(Quat q0,
                                   Quat q1)
Calculates the transformation that would take this quaternion (q0)to the given quaternion (q1).

Defined as q = q0* x q1
where q0* is the inverse of q0

Returns:
a Quat representing the transform

getAxisAngle

public void getAxisAngle(float[] aa)
Calculates the axis-angle representation of this rotation, and copies the value into aa. The format will be x y z a where a is in radians
Parameters:
aa - the float[4] that the axis-angle value will be copied in to.