public class Matrix3f
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
float |
m00
The first matrix element in the first row.
|
float |
m01
The second matrix element in the first row.
|
float |
m02
The third matrix element in the first row.
|
float |
m10
The first matrix element in the second row.
|
float |
m11
The second matrix element in the second row.
|
float |
m12
The third matrix element in the second row.
|
float |
m20
The first matrix element in the third row.
|
float |
m21
The second matrix element in the third row.
|
float |
m22
The third matrix element in the third row.
|
Constructor and Description |
---|
Matrix3f()
Constructs and initializes a Matrix3f to all zeros.
|
Matrix3f(float[] v)
Constructs and initializes a Matrix3f from the specified
nine-element array.
|
Matrix3f(float m00,
float m01,
float m02,
float m10,
float m11,
float m12,
float m20,
float m21,
float m22)
Constructs and initializes a Matrix3f from the specified nine values.
|
Matrix3f(Matrix3f m1)
Constructs a new matrix with the same values as the
Matrix3f parameter.
|
Matrix3f(Vec3f[] v)
Constructs and initializes a Matrix3f from the specified
nine-element array.
|
Modifier and Type | Method and Description |
---|---|
void |
getRow(int row,
float[] v)
Copies the matrix values in the specified row into the array parameter.
|
void |
getRow(int row,
Vec3f v)
Copies the matrix values in the specified row into the vector parameter.
|
void |
setIdentity()
Sets this Matrix3f to identity.
|
void |
setRow(int row,
float[] v)
Sets the specified row of this matrix3f to the three values provided.
|
void |
setRow(int row,
Vec3f v)
Sets the specified row of this matrix3f to the Vector provided.
|
java.lang.String |
toString()
Returns a string that contains the values of this Matrix3f.
|
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 Matrix3f(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)
m00
- the [0][0] elementm01
- the [0][1] elementm02
- the [0][2] elementm10
- the [1][0] elementm11
- the [1][1] elementm12
- the [1][2] elementm20
- the [2][0] elementm21
- the [2][1] elementm22
- the [2][2] elementpublic Matrix3f(float[] v)
v
- the array of length 9 containing in orderpublic Matrix3f(Vec3f[] v)
v
- the array of length 9 containing in orderpublic Matrix3f(Matrix3f m1)
m1
- the source matrixpublic Matrix3f()
public java.lang.String toString()
toString
in class java.lang.Object
public final void setIdentity()
public final void setRow(int row, float[] v)
row
- the row number to be modified (zero indexed)v
- the replacement rowpublic final void setRow(int row, Vec3f v)
row
- the row number to be modified (zero indexed)v
- the replacement rowpublic final void getRow(int row, Vec3f v)
row
- the matrix rowv
- the vector into which the matrix row values will be copiedpublic final void getRow(int row, float[] v)
row
- the matrix rowv
- the array into which the matrix row values will be copied