shout3d.math
Class RotUtil

java.lang.Object
  |
  +--shout3d.math.RotUtil

public class RotUtil
extends java.lang.Object

Rotation Utility Methods


Constructor Summary
RotUtil()
           
 
Method Summary
static void slerp(float[] v0, float[] v1, float t, float[] vResult)
          Places result of spherical linear interpolation between v0 and v1 in vResult, where vResult, v0 and v1 are all 3-vectors or all 4-vectors.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RotUtil

public RotUtil()
Method Detail

slerp

public static void slerp(float[] v0,
                         float[] v1,
                         float t,
                         float[] vResult)
Places result of spherical linear interpolation between v0 and v1 in vResult, where vResult, v0 and v1 are all 3-vectors or all 4-vectors. If the arguments are 3-vectors, then they are all assumed to be direction vectors. If the arguments are 4-vectors, then they are assumed to be rotations expressed in quaternion form. Whether the inputs are 3-vectors or 4-vectors, they must be normalized for correct results. All arguments must be pre-allocated. vResult must have room for 3 or 4 vectors (whichever corresponds to the v0 & v1 arguments).
Parameters:
v0 - the vector from which interpolation is performed
v1 - the vector toward which the interpolation is performed
t - interpolation fraction [0, 1] maps result to [v0, v1].
vResult - the interpolated vector