|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gumbo.graphic.math.Matrix4
A 3D spatial transform specifying an arbitrary homogenous transform, which is defined by a 4x4 matrix with double precision.
Field Summary | |
static Matrix4 |
IDENTITY
Identity matrix. |
static Matrix4 |
ZERO
Identity matrix. |
Constructor Summary | |
Matrix4()
|
Method Summary | |
static void |
clearArray(double[] val)
Sets a length 4 array to all zeros. |
static void |
clearArray(double[][] val)
Sets length 4x4 array to all zeros. |
boolean |
equals(java.lang.Object obj)
|
double[][] |
get(double[][] retVal)
Master whole state accessor. |
Matrix4 |
get(Matrix4 retVal)
|
java.lang.Object |
getGraphic()
Default implementation: Returns this (non-native implementation). |
Matrix4 |
getMatrix4()
Gets a singleton immutable view of this object with the same identity (hashCode(), equals()) as this object. |
Matrix4 |
inverse(Matrix4 retVal)
Inverts this matrix. |
Matrix4 |
set(double[][] matrix)
Master whole state mutator. |
Matrix4 |
set(Matrix4 matrix)
Sets this matrix to the value of another matrix. |
Matrix4 |
setIdentity()
Sets this matrix to the identity matrix. |
Matrix4 |
setScale(Tuple3 tuple)
Sets the whole matrix to scale by the specified amount. |
Matrix4 |
setTranslation(Tuple3 tuple)
Sets the whole matrix to translate by the specified amount. |
Matrix4 |
setZero()
Sets this matrix to all zeros. |
java.lang.String |
toString()
|
Matrix4 |
transform(Matrix4 matrix,
Matrix4 retVal)
Transforms a matrix by pre-multiplying it by this matrix. |
Point3 |
transform(Point3 point,
Point3 retVal)
Transforms a point by pre-multiplying it by this matrix. |
Vector3 |
transform(Vector3 vector,
Vector3 retVal)
Transforms a vector by pre-multiplying it by this matrix. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final Matrix4 ZERO
public static final Matrix4 IDENTITY
Constructor Detail |
public Matrix4()
Method Detail |
public Matrix4 set(double[][] matrix)
public Matrix4 set(Matrix4 matrix)
public Matrix4 setZero()
public Matrix4 setIdentity()
public Matrix4 setTranslation(Tuple3 tuple)
public Matrix4 setScale(Tuple3 tuple)
public Point3 transform(Point3 point, Point3 retVal)
point
- Value of the input point. Never null.retVal
- Return value object. The transformed point.
Can be the same as point. Never null.public Vector3 transform(Vector3 vector, Vector3 retVal)
vector
- Value of the input vector. Never null.retVal
- Return value object. The transformed vector.
Can be the same as vector. Never null.public Matrix4 transform(Matrix4 matrix, Matrix4 retVal)
matrix
- Value of the input matrix. Never null.retVal
- Return value object. The transformed matrix.
Can be the same as matrix or this matrix. Never null.public Matrix4 inverse(Matrix4 retVal)
retVal
- Return value object. The inverted matrix.
Can be the same as this matrix. Never null.public double[][] get(double[][] retVal)
public Matrix4 getMatrix4()
public Matrix4 get(Matrix4 retVal)
public java.lang.Object getGraphic()
getGraphic
in interface Graphic
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public static void clearArray(double[][] val)
public static void clearArray(double[] val)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |