public class Matrix4d
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
double |
m00
The first element of the first row.
|
double |
m01
The second element of the first row.
|
double |
m02
The third element of the first row.
|
double |
m03
The fourth element of the first row.
|
double |
m10
The first element of the second row.
|
double |
m11
The second element of the second row.
|
double |
m12
The third element of the second row.
|
double |
m13
The fourth element of the second row.
|
double |
m20
The first element of the third row.
|
double |
m21
The second element of the third row.
|
double |
m22
The third element of the third row.
|
double |
m23
The fourth element of the third row.
|
double |
m30
The first element of the fourth row.
|
double |
m31
The second element of the fourth row.
|
double |
m32
The third element of the fourth row.
|
double |
m33
The fourth element of the fourth row.
|
| Constructor and Description |
|---|
Matrix4d()
Constructs and initializes a Matrix4d to all zeros.
|
Matrix4d(double[] v)
Constructs and initializes a Matrix4d from the specified 16
element array.
|
Matrix4d(double m00,
double m01,
double m02,
double m03,
double m10,
double m11,
double m12,
double m13,
double m20,
double m21,
double m22,
double m23,
double m30,
double m31,
double m32,
double m33)
Constructs and initializes a Matrix4d from the specified 16 values.
|
Matrix4d(Matrix4d m1)
Constructs a new matrix with the same values as the
Matrix4d parameter.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Matrix4d m1)
Returns true if all of the data members of Matrix4d m1 are
equal to the corresponding data members in this Matrix4d.
|
boolean |
equals(java.lang.Object t1)
Returns true if the Object t1 is of type Matrix4d and all of the
data members of t1 are equal to the corresponding data members in
this Matrix4d.
|
void |
mul(Matrix4d m1)
Sets the value of this matrix to the result of multiplying itself
with matrix m1.
|
void |
rotX(double angle)
Sets the value of this matrix to a counter-clockwise rotation
about the x axis.
|
void |
rotY(double angle)
Sets the value of this matrix to a counter-clockwise rotation
about the y axis.
|
void |
rotZ(double angle)
Sets the value of this matrix to a counter-clockwise rotation
about the z axis.
|
void |
setIdentity()
Sets this Matrix4d to identity.
|
void |
setTranslation(Vector3d trans)
Modifies the translational components of this matrix to the values
of the Vector3d argument; the other values of this matrix are not
modified.
|
java.lang.String |
toString()
Returns a string that contains the values of this Matrix4d.
|
void |
transform(Vector3d normal)
Transforms the normal parameter by this transform and places the value
back into normal.
|
void |
transform(Vector3d normal,
Vector3d normalOut)
Transforms the normal parameter by this Matrix4d and places the value
into normalOut.
|
public double m00
public double m01
public double m02
public double m03
public double m10
public double m11
public double m12
public double m13
public double m20
public double m21
public double m22
public double m23
public double m30
public double m31
public double m32
public double m33
public Matrix4d(double m00,
double m01,
double m02,
double m03,
double m10,
double m11,
double m12,
double m13,
double m20,
double m21,
double m22,
double m23,
double m30,
double m31,
double m32,
double m33)
m00 - the [0][0] elementm01 - the [0][1] elementm02 - the [0][2] elementm03 - the [0][3] elementm10 - the [1][0] elementm11 - the [1][1] elementm12 - the [1][2] elementm13 - the [1][3] elementm20 - the [2][0] elementm21 - the [2][1] elementm22 - the [2][2] elementm23 - the [2][3] elementm30 - the [3][0] elementm31 - the [3][1] elementm32 - the [3][2] elementm33 - the [3][3] elementpublic Matrix4d(double[] v)
v - the array of length 16 containing in orderpublic Matrix4d(Matrix4d m1)
m1 - the source matrixpublic Matrix4d()
public java.lang.String toString()
toString in class java.lang.Objectpublic final void setIdentity()
public final void setTranslation(Vector3d trans)
trans - the translational componentpublic final void rotX(double angle)
angle - the angle to rotate about the X axis in radianspublic final void rotY(double angle)
angle - the angle to rotate about the Y axis in radianspublic final void rotZ(double angle)
angle - the angle to rotate about the Z axis in radianspublic final void mul(Matrix4d m1)
m1 - the other matrixpublic boolean equals(Matrix4d m1)
m1 - the matrix with which the comparison is madepublic boolean equals(java.lang.Object t1)
equals in class java.lang.Objectt1 - the matrix with which the comparison is madepublic final void transform(Vector3d normal, Vector3d normalOut)
normal - the input normal to be transformed.normalOut - the transformed normalpublic final void transform(Vector3d normal)
normal - the input normal to be transformed.