The following is a list of operations you can perform with the library and brief description of how to use them.
note: the term "square matrix" in the function name only means that each matrix needs to be of the same dimension not that they need to be of equal height and width.
public matrixMath(float matrix_[][])
public void setNumber(int i, int j, float value)
public float getNumber(int i, int j)
public int sizeRow()
public int sizeCol()
public matrixMath copy()
public matrixMath buildMatrx(int row, int col)
this function will create an nxn matrix and set all values to zero
the following functions will allow you to transform arrays of points of nx3 dimension.
public static matrixMath scalePoint(matrixMath x,int scaleX, int scaleY, int scaleZ)
public static matrixMath transPoint(matrixMath x,int transX, int transY, int transZ)
public static matrixMath shearPoint(matrixMath x,int shearX, int shearY, int shearZ)
public static matrixMath rotateXPoint(matrixMath x,int rotX)
public static matrixMath rotateYPoint(matrixMath x,int rotY)
public static matrixMath rotateZPoint(matrixMath x,int rotZ)
Identity matrix: This function will produce an identity matrix of a chosen size.
1000
0100
0010
0001
public static matrixMath identityMatrix(int matrixSize)
Multiply matrix: Multiply two matrices.
1234---4567
1234-*-4567
1234---4567
1234---4567
public static matrixMath multiplySquareMatrix(matrixMath matrixA, matrixMath matrixB)
Multiply 1 X N matrix: Multiply two matrices of different dimension.
4---4567
4-*-4567
4---4567
4---4567
public static matrixMath columnMultiplyMatrix(float matrixA[],matrixMath matrixB)
Scale matrix: Scale one matrix.
4---567
4-*-4567
4---567
4---567
public static matrixMath scaleSquareMatrix(matrixMath matrixA, matrixMath matrixB,int scaleFactor)
Add matrix: Add two matrices. 1234---4567
1234-+-4567
1234---4567
1234---4567
public static matrixMath addSquareMatrix(matrixMath matrixA, matrixMath matrixB)
Subtract matrix: subtract two matrices.
1234---4567
1234---4567
1234---4567
1234--- 4567
public static matrixMath subtractSquareMatrix(matrixMath matrixA, matrixMath matrixB)
Transpose matrix: transpose rows and columns.
1234---1111
1234-=-2222
1234---3333
1234---4444
public static matrixMath transposeMatrix(matrixMath matrixA)