|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Mat
Matrix transforms and composites for homogeneous coords points in 3D.
For CSU540 Computer Graphics class, Spring 2005 CCIS, Northeastern University
Consists of a single 4x4 double matrix, mat, and various static methods.
Method names ending with "Same" alter the matrix argument.
Others return a copy.
Field Summary | |
double[][] |
mat
The only (non-static) field, a 4x4 array. |
Constructor Summary | |
Mat()
Creates unit matrix with homogeneous 4th row, column elements |
Method Summary | |
static Mat |
emptyMat()
Creates an empty matrix with 1.0 in 3,3 lower corner |
static void |
main(java.lang.String[] args)
Tests and prints results of all methods (all are static) |
static Mat |
matrixXmatrix(Mat m1,
Mat m2)
Matrix product |
static Vec |
matrixXvector(Mat mat,
Vec v)
Matrix x vector ==> vector |
static Mat |
rotxMat(double theta)
Creates a rotation matrix around x axis. |
static Mat |
rotyMat(double theta)
Creates a rotation matrix around y axis. |
static Mat |
rotzMat(double theta)
Creates a rotation matrix around z axis. |
static Mat |
scaleMat(double theta)
Creates a scaling matrix. |
java.lang.String |
toString()
Lists all 16 elements of the matrix. |
static Mat |
transMat(double tx,
double ty,
double tz)
Creates a translation matrix with displacements tx, ty, tz. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public double[][] mat
Constructor Detail |
public Mat()
Method Detail |
public static void main(java.lang.String[] args)
public java.lang.String toString()
public static Mat emptyMat()
public static Mat transMat(double tx, double ty, double tz)
public static Mat rotxMat(double theta)
public static Mat rotyMat(double theta)
public static Mat rotzMat(double theta)
public static Mat scaleMat(double theta)
public static Vec matrixXvector(Mat mat, Vec v)
public static Mat matrixXmatrix(Mat m1, Mat m2)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |