|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--shout3d.math.MatUtil
Matrix and rotation Utility Methods
| Constructor Summary | |
MatUtil()
|
|
| Method Summary | |
static void |
axisToQuat(float[] fromAA,
float[] toQuat)
convert an axis/angle rotation into a quaternion rotation. |
static void |
composeQuats(float[] q1,
float[] q2,
float[] composedQuat)
Creates a third quaternion that is equivalent to the first followed by the second |
static float |
dot(float[] v1,
float[] v2)
Calculates the dot product of two 3-vectors |
static float[] |
getMatrixAlongPath(Node[] path,
boolean bottomToTop)
Gets the matrix equivalent to concatenating all the matrices along the given path. |
static void |
multDirMatrix(float[] mtx,
float[] v)
Transforms a direction by a 4x4 matrix. |
static float[] |
multMatrix44byMatrix44(float[] mat1,
float[] mat2)
Multiplies two 4x4 matrices, stores the result in the first, and returns that first matrix. |
static void |
multVecMatrix(float[] mtx,
float[] v)
Transforms a point by a 4x4 matrix |
static float |
normalize(float[] v)
Normalizes the given vector. |
static void |
quatToAxis(float[] fromQuat,
float[] toAA)
convert a quaternion rotation into an axis/angle rotation. |
static void |
setToIdentityMatrix44(float[] mtx)
Set a 4x4 matrix to be an identity matrix |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public MatUtil()
| Method Detail |
public static final void setToIdentityMatrix44(float[] mtx)
mtx - the transformation matrix
public static final void multVecMatrix(float[] mtx,
float[] v)
mtx - the transformation matrixv - the point to transform, answer returned in the point
public static final void multDirMatrix(float[] mtx,
float[] v)
mtx - the transformation matrixv - the direction to transform, answer returned in the pointpublic static final float normalize(float[] v)
v - the vector to normalize
public static final float dot(float[] v1,
float[] v2)
v1 - the first vectorv2 - the second vector
public static final void quatToAxis(float[] fromQuat,
float[] toAA)
fromQuat - the quaternion to converttoAA - the result axis/angle rotation
public static final void axisToQuat(float[] fromAA,
float[] toQuat)
fromAA - the axis/angle to converttoQuat - the result quaternion rotation
public static final void composeQuats(float[] q1,
float[] q2,
float[] composedQuat)
q1 - the first quaternion to composeq2 - the second quaternion to composecomposedQuat - the result of composing q1 and q2
public static final float[] multMatrix44byMatrix44(float[] mat1,
float[] mat2)
public static float[] getMatrixAlongPath(Node[] path,
boolean bottomToTop)
the - path along which to calculate the matrixbottomToTop - whether the matrix transforms from bottom space to top space or vice versa
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||