|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.generic.math.Matrix44D
Matrix44D represents a 4x4 matrix suitable for
- affine transformations in 3d
- affine transformations in 2d needed for a spline
| Field Summary | |
protected double[] |
matrix
Actual matrix data as an array of doubles of length 16. |
| Constructor Summary | |
Matrix44D()
Constructs a 4x4 matrix and initializes this transform. |
|
Matrix44D(double value)
Constructs a 4x4 matrix and initializes all fields of the matrix to the supplied value. |
|
Matrix44D(double[] source)
Constructs a 4x4 matrix and initializes all fields of the matrix with the corresponding valued from the supplied array of length 16. |
|
Matrix44D(double v00,
double v01,
double v02,
double v03,
double v10,
double v11,
double v12,
double v13,
double v20,
double v21,
double v22,
double v23)
Constructs and sets the values of the matrix by means of only the 12 relevant parameters. |
|
Matrix44D(double v00,
double v01,
double v02,
double v03,
double v10,
double v11,
double v12,
double v13,
double v20,
double v21,
double v22,
double v23,
double v30,
double v31,
double v32,
double v33)
Constructs and sets the values of the matrix by means of all 16 parameters. |
|
Matrix44D(Matrix44D source)
Constructs a 4x4 matrix and initializes all fields of the matrix with the corresponding values from another matrix. |
|
| Method Summary | |
void |
adjoint()
Builds the adjoint matrix of the 4x4 matrix. |
void |
clear()
Sets all fields of this matrix to 0.0. |
double |
determinant()
Computes the determinant of this matrix |
void |
divide(double divisor)
Divides all cells of this matrix by the supplied value. |
void |
identity()
Sets this matrix to the identity matrix: [ [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1] ]. |
void |
invert()
Inverts a 4x4 matrix generically. |
boolean |
isInvertible()
Checks if the determinant is considered zero and so the matrix is not invertible. |
void |
multiply(double factor)
Multiplies all cells of this matrix with the supplied value. |
void |
multiply(Matrix44D multiplier)
Performs a full matrix multiplication of the form: this = this * other. |
void |
set(double value)
Sets all fields of the matrix to the supplied value. |
void |
set(double v00,
double v01,
double v02,
double v03,
double v10,
double v11,
double v12,
double v13,
double v20,
double v21,
double v22,
double v23)
Sets the values of the matrix from only the 9 relevant parameters. |
void |
set(double v00,
double v01,
double v02,
double v03,
double v10,
double v11,
double v12,
double v13,
double v20,
double v21,
double v22,
double v23,
double v30,
double v31,
double v32,
double v33)
Sets the values of the matrix by means of all 16 parameters. |
void |
set(Matrix44D source)
Fills all fields of the matrix with the corresponding values from the matrix supplied as arugment. |
java.lang.String |
toString()
Returns a string representation of this matrix. |
void |
transform(Vector4 in,
Vector4 out)
Transforms a vector4 with this matrix. |
void |
transpose()
Tranposes this matrix. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected final double[] matrix
| Constructor Detail |
public Matrix44D()
public Matrix44D(double value)
value - the value each cell of the matrix is initialized to.public Matrix44D(Matrix44D source)
source - the other matrix whose values are copied into
this object.public Matrix44D(double[] source)
source - the array of length 9 that holds the values to
put into this object.
public Matrix44D(double v00,
double v01,
double v02,
double v03,
double v10,
double v11,
double v12,
double v13,
double v20,
double v21,
double v22,
double v23,
double v30,
double v31,
double v32,
double v33)
v00 - value for row 0, column 0v01 - value for row 0, column 1v02 - value for row 0, column 2v03 - value for row 0, column 3v10 - value for row 1, column 0v11 - value for row 1, column 1v12 - value for row 1, column 2v13 - value for row 1, column 3v20 - value for row 2, column 0v21 - value for row 2, column 1v22 - value for row 2, column 2v23 - value for row 2, column 3v30 - value for row 3, column 0v31 - value for row 3, column 1v32 - value for row 3, column 2v33 - value for row 3, column 3
public Matrix44D(double v00,
double v01,
double v02,
double v03,
double v10,
double v11,
double v12,
double v13,
double v20,
double v21,
double v22,
double v23)
v00 - value for row 0, column 0v01 - value for row 0, column 1v02 - value for row 0, column 2v03 - value for row 0, column 3v10 - value for row 1, column 0v11 - value for row 1, column 1v12 - value for row 1, column 2v13 - value for row 1, column 3v20 - value for row 2, column 0v21 - value for row 2, column 1v22 - value for row 2, column 2v23 - value for row 2, column 3| Method Detail |
public final void set(double value)
value - the value each cell of the matrix is filled with.
public final void set(double v00,
double v01,
double v02,
double v03,
double v10,
double v11,
double v12,
double v13,
double v20,
double v21,
double v22,
double v23,
double v30,
double v31,
double v32,
double v33)
v00 - value for row 0, column 0v01 - value for row 0, column 1v02 - value for row 0, column 2v03 - value for row 0, column 3v10 - value for row 1, column 0v11 - value for row 1, column 1v12 - value for row 1, column 2v13 - value for row 1, column 3v20 - value for row 2, column 0v21 - value for row 2, column 1v22 - value for row 2, column 2v23 - value for row 2, column 3v30 - value for row 3, column 0v31 - value for row 3, column 1v32 - value for row 3, column 2v33 - value for row 3, column 3
public final void set(double v00,
double v01,
double v02,
double v03,
double v10,
double v11,
double v12,
double v13,
double v20,
double v21,
double v22,
double v23)
v00 - value for row 0, column 0v01 - value for row 0, column 1v02 - value for row 0, column 2v03 - value for row 0, column 3v10 - value for row 1, column 0v11 - value for row 1, column 1v12 - value for row 1, column 2v13 - value for row 1, column 3v20 - value for row 2, column 0v21 - value for row 2, column 1v22 - value for row 2, column 2v23 - value for row 2, column 3public final void set(Matrix44D source)
source - the matrix whose cells are copied into this one.public final void multiply(double factor)
factor - factor that all fields are multiplied with.public final void divide(double divisor)
divisor - the divisor that all fields of this matrix are divided
by.
MathDynamicException - thrown if the divider is equal to zero.public void multiply(Matrix44D multiplier)
multiplier - a matrix that is multiplied onto this matrix.public final void clear()
0.0.
public final void identity()
[ [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1] ].
public final double determinant()
public final void adjoint()
public final void invert()
public final void transpose()
public final void transform(Vector4 in,
Vector4 out)
in - the input vector.out - the transformed output vector.public java.lang.String toString()
public boolean isInvertible()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||