|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--md3.util.QuaternionMath
Booch utility class with quaternion math operations. The quaternions handled by this class are represented as float[] quat with quat.length==4. The structure of the arrays is as follows: quat[0]==X, quat[1]==Y, quat[2]==Z and quat[3]==S, so the scalar part comes last!
Method Summary | |
static float[][] |
matrixFromQuaternion(float[] quat)
Creates a 3x3 rotation matrix from a given quaternion. |
static float[] |
quaternionFromMatrix(float[][] mat)
Creates a quaternion from a 3x3 rotation matrix. |
static float[] |
quaternionSlerp(float[] from,
float[] to,
float frac)
Do slerp (spherical linear interpolation) interpolation of quaternions along unit 4d sphere. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Method Detail |
public static final float[][] matrixFromQuaternion(float[] quat)
Creates a 3x3 rotation matrix from a given quaternion.
quat
- The source quaternion.public static final float[] quaternionFromMatrix(float[][] mat)
Creates a quaternion from a 3x3 rotation matrix.
mat
- The 3x3 source rotation matrix.public static final float[] quaternionSlerp(float[] from, float[] to, float frac)
Do slerp (spherical linear interpolation) interpolation of quaternions along unit 4d sphere.
from
- Start rotation.to
- End rotation.frac
- Specifies the slerp interpolation fraction.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |