java.io.Serializable
public class Matrix3f
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field | Description |
---|---|---|
float |
m00 |
The first element of the first row.
|
float |
m01 |
The second element of the first row.
|
float |
m02 |
third element of the first row.
|
float |
m10 |
The first element of the second row.
|
float |
m11 |
The second element of the second row.
|
float |
m12 |
The third element of the second row.
|
float |
m20 |
The first element of the third row.
|
float |
m21 |
The second element of the third row.
|
float |
m22 |
The third element of the third row.
|
Constructor | Description |
---|---|
Matrix3f() |
Constructs and initializes a Matrix3f to all zeros.
|
Modifier and Type | Method | Description |
---|---|---|
void |
add(Matrix3f m1) |
Sets the value of this matrix to sum of itself and matrix m1.
|
float |
determinant() |
Computes the determinant of this matrix.
|
boolean |
equals(java.lang.Object o) |
Returns true if the Object o is of type Matrix3f and all of the data
members of t1 are equal to the corresponding data members in this Matrix3f.
|
void |
getColumn(int column,
float[] v) |
Copies the matrix values in the specified column into the array parameter.
|
void |
getColumnV(int column,
Vector3f v) |
Copies the matrix values in the specified column into the vector parameter.
|
float |
getElement(int row,
int column) |
Retrieves the value at the specified row and column of this matrix.
|
void |
getRow(int row,
float[] v) |
Copies the matrix values in the specified row into the array parameter.
|
int |
hashCode() |
Returns a hash number based on the data values in this object.
|
void |
invert() |
Sets the value of this matrix to its inverse.
|
void |
invertM(Matrix3f m1) |
Sets the value of this matrix to the matrix inverse of the passed matrix
m1.
|
void |
mul(Matrix3f m1) |
Sets the value of this matrix to the result of multiplying itself with
matrix m1.
|
void |
mul2(Matrix3f m1,
Matrix3f m2) |
Sets the value of this matrix to the result of multiplying the two argument
matrices together.
|
void |
mulf(float scalar) |
Multiplies each element of this matrix by a scalar.
|
static Matrix3f |
newA(float[] v) |
Constructs and initializes a Matrix3f from the specified 9 element array.
|
static Matrix3f |
newM(Matrix3f m1) |
Constructs a new matrix with the same values as the Matrix3f parameter.
|
void |
rotX(float angle) |
Sets the value of this matrix to a rotation matrix about the x axis by the
passed angle.
|
void |
rotY(float angle) |
Sets the value of this matrix to a rotation matrix about the y axis by the
passed angle.
|
void |
rotZ(float angle) |
Sets the value of this matrix to a rotation matrix about the z axis by the
passed angle.
|
void |
setA(float[] m) |
Sets the values in this Matrix3f equal to the row-major array parameter
(ie, the first four elements of the array will be copied into the first row
of this matrix, etc.).
|
void |
setAA(AxisAngle4f a1) |
Sets the value of this matrix to the matrix conversion of the single
precision axis and angle argument.
|
void |
setColumn(int column,
float x,
float y,
float z) |
Sets the specified column of this matrix3d to the three values provided.
|
void |
setColumnA(int column,
float[] v) |
Sets the specified column of this matrix3d to the four values provided.
|
void |
setColumnV(int column,
Vector3f v) |
Sets the specified column of this matrix3d to the vector provided.
|
void |
setElement(int row,
int column,
float value) |
Sets the specified element of this matrix3d to the value provided.
|
void |
setIdentity() |
Sets this Matrix3f to identity.
|
void |
setM(Matrix3f m1) |
Sets the value of this matrix to the double value of the Matrix3f argument.
|
void |
setRow(int row,
float x,
float y,
float z) |
Sets the specified row of this matrix3d to the three values provided.
|
void |
setRowA(int row,
float[] v) |
Sets the specified row of this matrix3d to the four values provided.
|
void |
setRowV(int row,
Vector3f v) |
Sets the specified row of this matrix3d to the Vector provided.
|
void |
setScale(float scale) |
Sets the value of this matrix to a scale matrix with the passed scale
amount.
|
void |
setZero() |
Sets this matrix to all zeros.
|
void |
sub(Matrix3f m1) |
Sets the value of this matrix to the matrix difference of itself and matrix
m1 (this = this - m1).
|
java.lang.String |
toString() |
Returns a string that contains the values of this Matrix3f.
|
void |
transform(Tuple3f t) |
|
void |
transform2(Tuple3f t,
Tuple3f result) |
Transform the vector vec using this Matrix3f and place the result into
vecOut.
|
void |
transpose() |
Sets the value of this matrix to its transpose.
|
void |
transposeM(Matrix3f m1) |
Sets the value of this matrix to the transpose of the argument matrix
|
public float m00
public float m01
public float m02
public float m10
public float m11
public float m12
public float m20
public float m21
public float m22
public static Matrix3f newA(float[] v)
v
- the array of length 9 containing in orderpublic static Matrix3f newM(Matrix3f m1)
m1
- The source matrix.public java.lang.String toString()
toString
in class java.lang.Object
public final void setIdentity()
public final void setElement(int row, int column, float value)
row
- the row number to be modified (zero indexed)column
- the column number to be modified (zero indexed)value
- the new valuepublic final float getElement(int row, int column)
row
- the row number to be retrieved (zero indexed)column
- the column number to be retrieved (zero indexed)public final void setRow(int row, float x, float y, float z)
row
- the row number to be modified (zero indexed)x
- the first column elementy
- the second column elementz
- the third column elementpublic final void setRowV(int row, Vector3f v)
row
- the row number to be modified (zero indexed)v
- the replacement rowpublic final void getRow(int row, float[] v)
row
- the matrix rowv
- The array into which the matrix row values will be copiedpublic final void setRowA(int row, float[] v)
row
- the row number to be modified (zero indexed)v
- the replacement rowpublic final void setColumn(int column, float x, float y, float z)
column
- the column number to be modified (zero indexed)x
- the first row elementy
- the second row elementz
- the third row elementpublic final void setColumnV(int column, Vector3f v)
column
- the column number to be modified (zero indexed)v
- the replacement columnpublic final void setColumnA(int column, float[] v)
column
- the column number to be modified (zero indexed)v
- the replacement columnpublic final void getColumnV(int column, Vector3f v)
column
- the matrix columnv
- The vector into which the matrix row values will be copiedpublic final void getColumn(int column, float[] v)
column
- the matrix columnv
- The array into which the matrix row values will be copiedpublic final void add(Matrix3f m1)
m1
- the other matrixpublic final void sub(Matrix3f m1)
m1
- the other matrixpublic final void transpose()
public final void transposeM(Matrix3f m1)
m1
- the matrix to be transposedpublic final void setAA(AxisAngle4f a1)
a1
- the axis and angle to be convertedpublic final void setM(Matrix3f m1)
m1
- the matrix3fpublic final void setA(float[] m)
m
- public final void invertM(Matrix3f m1)
m1
- the matrix to be invertedpublic final void invert()
public final float determinant()
public final void setScale(float scale)
scale
- the scale factor for the matrixpublic final void rotX(float angle)
angle
- the angle to rotate about the X axis in radianspublic final void rotY(float angle)
angle
- the angle to rotate about the Y axis in radianspublic final void rotZ(float angle)
angle
- the angle to rotate about the Z axis in radianspublic final void mulf(float scalar)
scalar
- The scalar multiplier.public final void mul(Matrix3f m1)
m1
- the other matrixpublic final void mul2(Matrix3f m1, Matrix3f m2)
m1
- the first matrixm2
- the second matrixpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the object with which the comparison is made.public int hashCode()
hashCode
in class java.lang.Object
public final void setZero()
public final void transform(Tuple3f t)