mathematik
Class TransformMatrix4f
java.lang.Object
mathematik.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
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
IDENTITY
public static int IDENTITY
rotation
public Matrix3f rotation
translation
public Vector3f translation
TransformMatrix4f
public TransformMatrix4f()
TransformMatrix4f
public TransformMatrix4f(int theType)
TransformMatrix4f
public TransformMatrix4f(TransformMatrix4f theMatrix4f)
TransformMatrix4f
public TransformMatrix4f(float[] theMatrixArray)
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[] theArrayRepresentation)
multiply
public final void multiply(float theValue)
multiply
public final void multiply(float theValue,
TransformMatrix4f theMatrix4f)
multiply
public final void multiply(TransformMatrix4f theMatrix4f)
transform
public final void transform(Vector3f theResult)
toArray
public final float[] toArray()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
main
public static void main(java.lang.String[] args)
processing library gestalt_p5 by Patrick Kochlik + Dennis Paul. (c) 2009