|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectastex.Matrix
public class Matrix
A class for storing and manipulating a 4x4 matrix.
| Field Summary | |
|---|---|
double |
x00
The elements of the matrix. |
double |
x01
The elements of the matrix. |
double |
x02
The elements of the matrix. |
double |
x03
The elements of the matrix. |
double |
x10
|
double |
x11
|
double |
x12
|
double |
x13
|
double |
x20
|
double |
x21
|
double |
x22
|
double |
x23
|
double |
x30
|
double |
x31
|
double |
x32
|
double |
x33
|
| Constructor Summary | |
|---|---|
Matrix()
Default constructor. |
|
Matrix(Matrix in)
Default constructor. |
|
| Method Summary | |
|---|---|
static void |
adjoint(Matrix in,
Matrix out)
adjoint( original_matrix, inverse_matrix ) calculate the adjoint of a 4x4 matrix Let a denote the minor determinant of matrix A obtained by ij deleting the ith row and jth column from A. |
void |
copy(Matrix m)
Copy m into this matrix. |
boolean |
equals(Matrix m)
Does this matrix equal another matrix. |
void |
fromQuaternion(double[] q)
Generate rotation matrix from quaternion. |
void |
fromQuaternion(double q1,
double q2,
double q3,
double q4)
Generate rotation matrix from quaternion. |
static Matrix |
interpolate(Matrix MS,
Matrix MF,
double frac)
Interpolate a new matrix. |
static void |
interpolate(Matrix MS,
Matrix MF,
double frac,
Matrix MI)
Interpolate a new matrix. |
static void |
invert(Matrix in,
Matrix out)
invert( original_matrix, inverse_matrix ) calculate the inverse of a 4x4 matrix -1 A = ___1__ adjoint A det A |
boolean |
isIdentity()
Does this matrix equal another matrix. |
boolean |
isIdentity(double tol)
|
void |
pretranslate(double tx,
double ty,
double tz)
Translate the transformation matrix the other way. |
void |
print()
Print a default message with the matrix. |
void |
print(java.lang.String message)
Print the matrix. |
java.lang.String |
returnScript()
|
void |
rotateAroundVector(double x,
double y,
double z,
double theta)
Rotate around a line. |
void |
rotateAroundVector(Point3d p,
double theta)
Rotate around a line. |
void |
rotateXdegrees(double d)
Rotate around x in degrees. |
void |
rotateYdegrees(double d)
Rotate around y in degrees. |
void |
rotateZdegrees(double d)
Rotate around Z in degrees. |
void |
scale(double s)
Scale the transformation matrix. |
void |
scale(double sx,
double sy,
double sz)
Apply non uniform scale. |
void |
set(int i,
int j,
double val)
|
void |
set(Matrix m)
Set matrix from another. |
void |
setIdentity()
Set the matrix to the identity matrix. |
static void |
slerp(double[] Q0,
double[] Q1,
double T,
double[] Result)
The famous quaternion slerp. |
void |
toQuaternion(double[] q)
Convert a matrix to a quaternion. |
void |
transform(Matrix m)
Transform by another matrix. |
void |
transform(Point3d p)
Transform a point by the current matrix. |
void |
transformByInverse(Point3d p)
Transform a point by the inverse matrix (assumes rotation matrix) |
void |
translate(double tx,
double ty,
double tz)
Translate the transformation matrix. |
void |
transpose()
Transpose the matrix. |
void |
zero()
Set the matrix to the zero matrix. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public double x00
public double x01
public double x02
public double x03
public double x10
public double x11
public double x12
public double x13
public double x20
public double x21
public double x22
public double x23
public double x30
public double x31
public double x32
public double x33
| Constructor Detail |
|---|
public Matrix()
public Matrix(Matrix in)
| Method Detail |
|---|
public void setIdentity()
public void zero()
public void set(Matrix m)
public void set(int i,
int j,
double val)
public void scale(double s)
public void scale(double sx,
double sy,
double sz)
public void translate(double tx,
double ty,
double tz)
public void pretranslate(double tx,
double ty,
double tz)
public void rotateXdegrees(double d)
public void rotateYdegrees(double d)
public void rotateZdegrees(double d)
public void transform(Matrix m)
public void transform(Point3d p)
public void transformByInverse(Point3d p)
public void rotateAroundVector(Point3d p,
double theta)
public void rotateAroundVector(double x,
double y,
double z,
double theta)
public void print()
public void print(java.lang.String message)
public java.lang.String returnScript()
public boolean equals(Matrix m)
public boolean isIdentity()
public boolean isIdentity(double tol)
public void copy(Matrix m)
public void transpose()
public static void invert(Matrix in,
Matrix out)
public static void adjoint(Matrix in,
Matrix out)
public static Matrix interpolate(Matrix MS,
Matrix MF,
double frac)
public static void interpolate(Matrix MS,
Matrix MF,
double frac,
Matrix MI)
public void toQuaternion(double[] q)
public void fromQuaternion(double[] q)
public void fromQuaternion(double q1,
double q2,
double q3,
double q4)
public static void slerp(double[] Q0,
double[] Q1,
double T,
double[] Result)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||