Package teilchen.util
Class TransformMatrix4f
- java.lang.Object
-
- teilchen.util.TransformMatrix4f
-
- All Implemented Interfaces:
java.io.Serializable
public class TransformMatrix4f extends java.lang.Object implements java.io.Serializable
special form of a 4x4 matrix. first of all the way we represent the matrix in this class is similar to the way opengl handles the row column issue. transform matrix -- r = rotation, t = translation rxx rxy rxz 0 ryx ryy ryz 0 rzx rzy rzz 0 tx ty tz 1 the transform matrix is special in the way that is a 3x3 matrix for rotation and scale and a translation vector. the remaining four values a constants. this is the way opengl specifies a 4x4 matrix and also the way 'toArray' returns an array. m[0] m[4] m[8] m[12] m[1] m[5] m[9] m[13] M=( ) m[2] m[6] m[10] m[14] m[3] m[7] m[11] m[15] here is an excerpt from the glMultMatrix man page. "In many computer languages 4x4 arrays are represented in row-major order. The transformations just described represent these matrices in column-major order. The order of the multiplication is important. For example, if the current transformation is a rotation, and glMultMatrix is called with a translation matrix, the translation is done directly on the coordinates to be transformed, while the rotation is done on the results of that translation." also read 'The Matrix and Quaternions FAQ' at http://www.flipcode.com/documents/matrfaq.html- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
IDENTITY
Matrix3f
rotation
processing.core.PVector
translation
-
Constructor Summary
Constructors Constructor Description TransformMatrix4f()
TransformMatrix4f(float[] pMatrixArray)
TransformMatrix4f(int pType)
TransformMatrix4f(TransformMatrix4f pMatrix4f)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description float
determinant()
static void
main(java.lang.String[] args)
void
multiply(float pValue)
void
multiply(float pValue, TransformMatrix4f pMatrix4f)
void
multiply(TransformMatrix4f pMatrix4f)
void
set(float[] pArrayRepresentation)
void
set(TransformMatrix4f mat)
void
setIdentity()
void
setRotationIdentity()
void
setZero()
float[]
toArray()
java.lang.String
toString()
void
transform(processing.core.PVector pResult)
-
-
-
Field Detail
-
IDENTITY
public static int IDENTITY
-
rotation
public Matrix3f rotation
-
translation
public processing.core.PVector translation
-
-
Constructor Detail
-
TransformMatrix4f
public TransformMatrix4f()
-
TransformMatrix4f
public TransformMatrix4f(int pType)
-
TransformMatrix4f
public TransformMatrix4f(TransformMatrix4f pMatrix4f)
-
TransformMatrix4f
public TransformMatrix4f(float[] pMatrixArray)
-
-
Method Detail
-
setIdentity
public final void setIdentity()
-
setRotationIdentity
public final void setRotationIdentity()
-
setZero
public final void setZero()
-
determinant
public final float determinant()
-
set
public final void set(TransformMatrix4f mat)
-
set
public final void set(float[] pArrayRepresentation)
-
multiply
public final void multiply(float pValue)
-
multiply
public final void multiply(float pValue, TransformMatrix4f pMatrix4f)
-
multiply
public final void multiply(TransformMatrix4f pMatrix4f)
-
transform
public final void transform(processing.core.PVector pResult)
-
toArray
public final float[] toArray()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
main
public static void main(java.lang.String[] args)
-
-