org.fixbin.ddd
Class Matrix33

java.lang.Object
  extended byorg.fixbin.ddd.Matrix33

public class Matrix33
extends java.lang.Object

This is the special form of a 3x3 Matrix.


Field Summary
 long[][] mat
           
static Matrix33 unity
           
 
Constructor Summary
Matrix33()
          Creates a new (default) instance of Matrix33
Matrix33(long mat00, long mat01, long mat02, long mat10, long mat11, long mat12, long mat20, long mat21, long mat22)
          Creates a new instance of Matrix and allows to preset all matrix values
 
Method Summary
 long getValue(int row, int col)
          Returns the content of a field in the Matrix
 void rotateX(long angle)
          Rotate around X axis
 void rotateY(long angle)
          Rotate around Y axis
 void rotateZ(long angle)
          Rotate around Z axis
 void setValue(int row, int col, long value)
          Sets the content of a field in the Matrix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

unity

public static Matrix33 unity

mat

public long[][] mat
Constructor Detail

Matrix33

public Matrix33()
Creates a new (default) instance of Matrix33


Matrix33

public Matrix33(long mat00,
                long mat01,
                long mat02,
                long mat10,
                long mat11,
                long mat12,
                long mat20,
                long mat21,
                long mat22)
Creates a new instance of Matrix and allows to preset all matrix values

Parameters:
mat00 - (long) the preset at row 0, col 0
mat01 - (long) the preset at row 0, col 1
mat02 - (long) the preset at row 0, col 2
mat10 - (long) the preset at row 1, col 0
mat11 - (long) the preset at row 1, col 1
mat12 - (long) the preset at row 1, col 2
mat20 - (long) the preset at row 2, col 0
mat21 - (long) the preset at row 2, col 1
mat22 - (long) the preset at row 2, col 2
Method Detail

getValue

public long getValue(int row,
                     int col)
Returns the content of a field in the Matrix

Parameters:
row - (int)
col - (int)
Returns:
the value at the position [row/col]

setValue

public void setValue(int row,
                     int col,
                     long value)
Sets the content of a field in the Matrix

Parameters:
row - (int)
col - (int)
value - (long)

rotateX

public void rotateX(long angle)
             throws java.lang.Exception
Rotate around X axis

Parameters:
angle - (long) the angle that should be rotated
Throws:
java.lang.Exception

rotateY

public void rotateY(long angle)
             throws java.lang.Exception
Rotate around Y axis

Parameters:
angle - (long) the angle that should be rotated
Throws:
java.lang.Exception

rotateZ

public void rotateZ(long angle)
             throws java.lang.Exception
Rotate around Z axis

Parameters:
angle - (long) the angle that should be rotated
Throws:
java.lang.Exception