org.openmali.vecmath2.util
Class Interpolation

java.lang.Object
  extended by org.openmali.vecmath2.util.Interpolation

public class Interpolation
extends java.lang.Object

Utils for animation interpolation.


Constructor Summary
Interpolation()
           
 
Method Summary
static Quaternion4f fastNormalize(Quaternion4f quat)
          Fast quaternion normalization - fast method
static void interpolate(Tuple3f tupleOrigin, Tuple3f tupleDestiny, float delta, Tuple3f toInterpolate)
          Interpolate between two Tuple3fs in 3D space.
static void nlerp(Quaternion4f quatOrigin, Quaternion4f quatDestiny, float delta, Quaternion4f toInterpolate)
          Normalized Linear Interpolation between two Quaternions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Interpolation

public Interpolation()
Method Detail

nlerp

public static final void nlerp(Quaternion4f quatOrigin,
                               Quaternion4f quatDestiny,
                               float delta,
                               Quaternion4f toInterpolate)
Normalized Linear Interpolation between two Quaternions

Parameters:
quatOrigin - origin quaternion
quatDestiny - destiny quaternion
delta - interpolation time
toInterpolate -

fastNormalize

public static Quaternion4f fastNormalize(Quaternion4f quat)
Fast quaternion normalization - fast method

Parameters:
quat -
Returns:
quaternion normalized

interpolate

public static void interpolate(Tuple3f tupleOrigin,
                               Tuple3f tupleDestiny,
                               float delta,
                               Tuple3f toInterpolate)
Interpolate between two Tuple3fs in 3D space.

Parameters:
toInterpolate -
tupleOrigin - The keyframe "before" now
delta - The time that has passed since the last update.
tupleDestiny - The keyframe "after" now