com.bulletphysics.linearmath
Class QuaternionUtil

java.lang.Object
  extended by com.bulletphysics.linearmath.QuaternionUtil

public class QuaternionUtil
extends Object

Utility functions for quaternions.


Constructor Summary
QuaternionUtil()
           
 
Method Summary
static float getAngle(Quat4f q)
           
static void inverse(Quat4f q)
           
static void inverse(Quat4f q, Quat4f src)
           
static void mul(Quat4f q, Vector3f w)
           
static Vector3f quatRotate(Quat4f rotation, Vector3f v, Vector3f out)
           
static void setEuler(Quat4f q, float yaw, float pitch, float roll)
           
static void setRotation(Quat4f q, Vector3f axis, float angle)
           
static Quat4f shortestArcQuat(Vector3f v0, Vector3f v1, Quat4f out)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuaternionUtil

public QuaternionUtil()
Method Detail

getAngle

public static float getAngle(Quat4f q)

setRotation

public static void setRotation(Quat4f q,
                               Vector3f axis,
                               float angle)

shortestArcQuat

public static Quat4f shortestArcQuat(Vector3f v0,
                                     Vector3f v1,
                                     Quat4f out)

mul

public static void mul(Quat4f q,
                       Vector3f w)

quatRotate

public static Vector3f quatRotate(Quat4f rotation,
                                  Vector3f v,
                                  Vector3f out)

inverse

public static void inverse(Quat4f q)

inverse

public static void inverse(Quat4f q,
                           Quat4f src)

setEuler

public static void setEuler(Quat4f q,
                            float yaw,
                            float pitch,
                            float roll)