model
Class Matrix4x4f

java.lang.Object
  extended by model.Matrix4x4f

public class Matrix4x4f
extends java.lang.Object

Matrix4x4f is a 4x4 matrix of floats. It's stored in a 1-d float array, so it's important to keep in mind that everything is done in column-major order for OpenGL.


Field Summary
static float[] IDENTITY_MATRIX
           
 
Constructor Summary
Matrix4x4f()
           
Matrix4x4f(float[] m)
           
Matrix4x4f(Matrix4x4f m)
           
 
Method Summary
 float[] getIdentity()
           
 float[] getMatrix()
           
 void multMatrix(float[] m)
           
 void multMatrix(Matrix4x4f m)
           
 void multVertices(float[][] original, float[][] result)
           
 void rotateBy(float rotX, float rotY, float rotZ)
           
 void scaleBy(float scaleX, float scaleY, float scaleZ)
           
 void setMatrix(float[] m)
           
 void setMatrix(Matrix4x4f m)
           
 void setTransformations(float[] trans, float[] rot, float[] scale)
           
 void swapMajorOrder()
           
 void translateBy(float transX, float transY, float transZ)
          Applies a translation to the matrix.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IDENTITY_MATRIX

public static final float[] IDENTITY_MATRIX
Constructor Detail

Matrix4x4f

public Matrix4x4f()

Matrix4x4f

public Matrix4x4f(float[] m)

Matrix4x4f

public Matrix4x4f(Matrix4x4f m)
Method Detail

getMatrix

public float[] getMatrix()

getIdentity

public float[] getIdentity()

setMatrix

public void setMatrix(Matrix4x4f m)

setMatrix

public void setMatrix(float[] m)

swapMajorOrder

public void swapMajorOrder()

multMatrix

public void multMatrix(Matrix4x4f m)

multMatrix

public void multMatrix(float[] m)

multVertices

public void multVertices(float[][] original,
                         float[][] result)

translateBy

public void translateBy(float transX,
                        float transY,
                        float transZ)
Applies a translation to the matrix.

Parameters:
transX - translation in x direction
transY - translation in y direction
transZ - translation in z direction

scaleBy

public void scaleBy(float scaleX,
                    float scaleY,
                    float scaleZ)

rotateBy

public void rotateBy(float rotX,
                     float rotY,
                     float rotZ)

setTransformations

public void setTransformations(float[] trans,
                               float[] rot,
                               float[] scale)