math
Class TransformationMatrix4x4

java.lang.Object
  extended by math.TransformationMatrix4x4

public class TransformationMatrix4x4
extends java.lang.Object

a transformation matrix, which also contains the inverse matrix


Constructor Summary
TransformationMatrix4x4()
          constructor (fills with unit matrix)
TransformationMatrix4x4(Matrix4x4 m, Matrix4x4 im)
          manually sets the matrix and its inverse
TransformationMatrix4x4(TransformationMatrix4x4 tm)
           
 
Method Summary
 void createRotationMatrix(double alpha, double beta, double gamma)
          creates a rotation matrix order: 1. z-rotation, 2. y-rotation, 3. x-rotation
 void createScaleMatrix(double sx, double sy, double sz)
          creates a scale matrix in all directions
 void createTranslationMatrix(Vector3D v)
          creates a translation matrix from a vector
 void createUnitMatrix()
          creates the unit matrix
 void createXRotationMatrix(double alpha)
          rotation around x-axis
 void createXScaleMatrix(double sx)
          creates a scale matrix in x-direction
 void createYRotationMatrix(double beta)
          rotation around y-axis
 void createYScaleMatrix(double sy)
          creates a scale matrix in y-direction
 void createZRotationMatrix(double gamma)
          rotation around z-axis
 void createZScaleMatrix(double sz)
          creates a scale matrix in z-direction
 Matrix4x4 getInverseMatrix()
           
 Matrix4x4 getMatrix()
           
 void transform(TransformationMatrix4x4 mat)
          creates a scale matrix in all directions
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformationMatrix4x4

public TransformationMatrix4x4()
constructor (fills with unit matrix)


TransformationMatrix4x4

public TransformationMatrix4x4(Matrix4x4 m,
                               Matrix4x4 im)
manually sets the matrix and its inverse

Parameters:
m - [in] 4x4 matrix
im - [in] 4x4 inverse matrix

TransformationMatrix4x4

public TransformationMatrix4x4(TransformationMatrix4x4 tm)
Method Detail

getMatrix

public Matrix4x4 getMatrix()
Returns:
the transformation matrix

getInverseMatrix

public Matrix4x4 getInverseMatrix()
Returns:
the inverse transformation matrix

createUnitMatrix

public void createUnitMatrix()
creates the unit matrix


createXRotationMatrix

public void createXRotationMatrix(double alpha)
rotation around x-axis

Parameters:
alpha - [in] angle in radians

createYRotationMatrix

public void createYRotationMatrix(double beta)
rotation around y-axis

Parameters:
beta - [in] angle in radians

createZRotationMatrix

public void createZRotationMatrix(double gamma)
rotation around z-axis

Parameters:
gamma - [in] angle in radians

createRotationMatrix

public void createRotationMatrix(double alpha,
                                 double beta,
                                 double gamma)
creates a rotation matrix order: 1. z-rotation, 2. y-rotation, 3. x-rotation

Parameters:
alpha - [in] x-angle in radians
beta - [in] y-angle in radians
gamma - [in] z-angle in radians

createTranslationMatrix

public void createTranslationMatrix(Vector3D v)
creates a translation matrix from a vector

Parameters:
v - [in] translation vector

createXScaleMatrix

public void createXScaleMatrix(double sx)
creates a scale matrix in x-direction

Parameters:
sx - [in] scaling

createYScaleMatrix

public void createYScaleMatrix(double sy)
creates a scale matrix in y-direction

Parameters:
sy - [in] scaling

createZScaleMatrix

public void createZScaleMatrix(double sz)
creates a scale matrix in z-direction

Parameters:
sz - [in] scaling

createScaleMatrix

public void createScaleMatrix(double sx,
                              double sy,
                              double sz)
creates a scale matrix in all directions

Parameters:
sx - [in] x-scaling
sy - [in] y-scaling
sz - [in] z-scaling

transform

public void transform(TransformationMatrix4x4 mat)
creates a scale matrix in all directions

Parameters:
mat - 4x4 transformation matrix