public class Matrix4f extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static Matrix4f |
IDENTITY
Identity matrix:
|
float |
M00
Matrix data:
|
float |
M01
Matrix data:
|
float |
M02
Matrix data:
|
float |
M03
Matrix data:
|
float |
M10 |
float |
M11 |
float |
M12 |
float |
M13 |
float |
M20 |
float |
M21 |
float |
M22 |
float |
M23 |
float |
M30 |
float |
M31 |
float |
M32 |
float |
M33 |
private static long |
serialVersionUID |
static Matrix4f |
ZERO
Zero matrix:
|
Constructor and Description |
---|
Matrix4f()
Create the zero matrix.
|
Matrix4f(boolean bZero)
If bZero is true, create the zero matrix.
|
Matrix4f(float[] afEntry,
boolean bRowMajor)
Create a matrix from an array of numbers.
|
Matrix4f(float fM00,
float fM01,
float fM02,
float fM03,
float fM10,
float fM11,
float fM12,
float fM13,
float fM20,
float fM21,
float fM22,
float fM23,
float fM30,
float fM31,
float fM32,
float fM33)
input Mrc is in row r, column c.
|
Matrix4f(Matrix4f rkM)
copy constructor
|
Modifier and Type | Method and Description |
---|---|
Matrix4f |
adjoint()
Compute the adjoint of this matrix, setting this: this = Adjoint(this).
|
void |
Adjoint()
Deprecated.
|
Matrix4f |
copy(Matrix4f rkM)
copy, overwrite this.
|
void |
Copy(Matrix4f rkM)
Deprecated.
|
float |
determinant()
Return the determinant of this matrix.
|
float |
Determinant()
Deprecated.
|
boolean |
equals(Object kObject) |
float |
get(int iRow,
int iCol)
Get member access
|
float |
Get(int iRow,
int iCol)
Deprecated.
|
void |
getColumnMajor(float[] afCMajor)
Get member access.
|
void |
GetColumnMajor(float[] afCMajor)
Deprecated.
|
void |
getData(float[] afData)
Get member access.
|
void |
GetData(float[] afData)
Deprecated.
|
Matrix4f |
identity()
make this the identity matrix
|
Matrix4f |
inverse()
Invert a 4x4 using cofactors.
|
void |
Inverse()
Deprecated.
|
static Matrix4f |
inverse(Matrix4f kM)
Invert a 4x4 using cofactors.
|
void |
Inverse(Matrix4f kM)
Deprecated.
|
void |
MakeIdentity()
Deprecated.
|
Matrix4f |
makeObliqueProjection(Vector3f rkNormal,
Vector3f rkPoint,
Vector3f rkDirection) |
void |
MakeObliqueProjection(Vector3f rkNormal,
Vector3f rkPoint,
Vector3f rkDirection)
Deprecated.
|
Matrix4f |
makePerspectiveProjection(Vector3f rkNormal,
Vector3f rkPoint,
Vector3f rkEye) |
void |
MakePerspectiveProjection(Vector3f rkNormal,
Vector3f rkPoint,
Vector3f rkEye)
Deprecated.
|
Matrix4f |
makeReflection(Vector3f rkNormal,
Vector3f rkPoint) |
void |
MakeReflection(Vector3f rkNormal,
Vector3f rkPoint)
Deprecated.
|
Matrix4f |
makeZero()
make this the zero matrix
|
void |
MakeZero()
Deprecated.
|
Matrix4f |
mult(Matrix4f kM)
Multiply this matrix to the input matrix: this = this * kM
|
void |
Mult(Matrix4f kM)
Deprecated.
|
static Matrix4f |
mult(Matrix4f kM1,
Matrix4f kM2)
Multiply the two input matrices, setting this: this = kM1 * kM2
|
void |
Mult(Matrix4f kM1,
Matrix4f kM2)
Deprecated.
|
Vector4f |
mult(Vector4f kIn)
matrix times vector: kOut = this * kIn
|
void |
mult(Vector4f kIn,
Vector4f kOut)
matrix times vector: kOut = this * kIn
|
void |
Mult(Vector4f kIn,
Vector4f kOut)
Deprecated.
|
Matrix4f |
multLeft(Matrix4f kM)
Multiply the two input matrices, setting this: this = kM1 * this
|
void |
MultLeft(Matrix4f kM)
Deprecated.
|
Vector4f |
multLeft(Vector4f kIn)
matrix times vector: v^T * this
|
void |
multLeft(Vector4f kIn,
Vector4f rkOut)
matrix times vector: v^T * this
|
void |
MultLeft(Vector4f kIn,
Vector4f rkOut)
Deprecated.
|
Vector4f |
multRight(Vector4f kIn)
matrix times vector: kOut = this * kIn
|
void |
multRight(Vector4f kIn,
Vector4f kOut)
matrix times vector: kOut = this * kIn
|
void |
MultRight(Vector4f kIn,
Vector4f kOut)
Deprecated.
|
float |
qForm(Vector4f rkU,
Vector4f rkV)
Calculate and return u^T*M*v
|
float |
QForm(Vector4f rkU,
Vector4f rkV)
Deprecated.
|
Matrix4f |
set(float fM00,
float fM01,
float fM02,
float fM03,
float fM10,
float fM11,
float fM12,
float fM13,
float fM20,
float fM21,
float fM22,
float fM23,
float fM30,
float fM31,
float fM32,
float fM33)
input Mrc is in row r, column c.
|
void |
Set(float fM00,
float fM01,
float fM02,
float fM03,
float fM10,
float fM11,
float fM12,
float fM13,
float fM20,
float fM21,
float fM22,
float fM23,
float fM30,
float fM31,
float fM32,
float fM33)
Deprecated.
|
Matrix4f |
set(int iRow,
int iCol,
float fValue)
Set member access
|
void |
Set(int iRow,
int iCol,
float fValue)
Deprecated.
|
Matrix4f |
timesTranspose(Matrix4f kM)
Multiply this matrix by transpose of the input matrix, setting this: this
= this * M^T
|
void |
TimesTranspose(Matrix4f kM)
Deprecated.
|
String |
toString()
Returns a string representation of the matrix values.
|
Matrix4f |
transpose()
Transpose this matrix, setting this, this = this^T
|
void |
Transpose()
Deprecated.
|
static Matrix4f |
transpose(Matrix4f kM)
Transpose the input matrix, setting this, this = kM^T
|
void |
Transpose(Matrix4f kM)
Deprecated.
|
Matrix4f |
transposeTimes(Matrix4f kM)
Transpose this matrix and multiply by input, setting this: this = this^T
* M
|
void |
TransposeTimes(Matrix4f kM)
Deprecated.
|
static Matrix4f |
transposeTimes(Matrix4f kM1,
Matrix4f kM2)
Transpose M1 and multiply by M2, setting this: this = M1^T * M2
|
void |
TransposeTimes(Matrix4f kM1,
Matrix4f kM2)
Deprecated.
|
private static final long serialVersionUID
public static final Matrix4f ZERO
public static final Matrix4f IDENTITY
public float M00
public float M01
public float M02
public float M03
public float M10
public float M11
public float M12
public float M13
public float M20
public float M21
public float M22
public float M23
public float M30
public float M31
public float M32
public float M33
public Matrix4f()
public Matrix4f(boolean bZero)
bZero
- when true create the zero matrix, othersize create identity.public Matrix4f(float fM00, float fM01, float fM02, float fM03, float fM10, float fM11, float fM12, float fM13, float fM20, float fM21, float fM22, float fM23, float fM30, float fM31, float fM32, float fM33)
fM00
- matrix[0] entryfM01
- matrix[1] entryfM02
- matrix[2] entryfM03
- matrix[3] entryfM10
- matrix[4] entryfM11
- matrix[5] entryfM12
- matrix[6] entryfM13
- matrix[7] entryfM20
- matrix[8] entryfM21
- matrix[9] entryfM22
- matrix[10] entryfM23
- matrix[11] entryfM30
- matrix[12] entryfM31
- matrix[13] entryfM32
- matrix[14] entryfM33
- matrix[15] entrypublic Matrix4f(float[] afEntry, boolean bRowMajor)
afEntry
- array of values to put in matrixbRowMajor
- when true copy in row major order.public Matrix4f(Matrix4f rkM)
rkM
- matrix to copypublic void Adjoint()
public Matrix4f adjoint()
public void Copy(Matrix4f rkM)
rkM
- matrix to copypublic float Determinant()
public float determinant()
public final float Get(int iRow, int iCol)
iRow
- row to getiCol
- column to getpublic final float get(int iRow, int iCol)
iRow
- row to getiCol
- column to getpublic void GetColumnMajor(float[] afCMajor)
afCMajor
- copy matrix into array.public void getColumnMajor(float[] afCMajor)
afCMajor
- copy matrix into array.public void GetData(float[] afData)
afData
- copy matrix into array.public void getData(float[] afData)
afData
- copy matrix into array.public void Inverse()
public Matrix4f inverse()
public void Inverse(Matrix4f kM)
public static Matrix4f inverse(Matrix4f kM)
public void MakeIdentity()
public Matrix4f identity()
public void MakeObliqueProjection(Vector3f rkNormal, Vector3f rkPoint, Vector3f rkDirection)
rkNormal
- normal vectorrkPoint
- pointrkDirection
- direction vectorpublic Matrix4f makeObliqueProjection(Vector3f rkNormal, Vector3f rkPoint, Vector3f rkDirection)
public void MakePerspectiveProjection(Vector3f rkNormal, Vector3f rkPoint, Vector3f rkEye)
rkNormal
- normal vectorrkPoint
- pointrkEye
- eye vectorpublic Matrix4f makePerspectiveProjection(Vector3f rkNormal, Vector3f rkPoint, Vector3f rkEye)
public void MakeReflection(Vector3f rkNormal, Vector3f rkPoint)
rkNormal
- normal vectorrkPoint
- pointpublic void MakeZero()
public Matrix4f makeZero()
public void Mult(Matrix4f kM)
kM
- input matrixpublic Matrix4f mult(Matrix4f kM)
kM
- input matrixpublic void Mult(Matrix4f kM1, Matrix4f kM2)
kM1
- first input matrixkM2
- second input matrixpublic static Matrix4f mult(Matrix4f kM1, Matrix4f kM2)
kM1
- first input matrixkM2
- second input matrixpublic void Mult(Vector4f kIn, Vector4f kOut)
kIn
- input vectorkOut
- output vector = this * vpublic void mult(Vector4f kIn, Vector4f kOut)
kIn
- input vectorkOut
- output vector = this * vpublic Vector4f mult(Vector4f kIn)
kIn
- input vectorkOut
- output vector = this * vpublic void MultLeft(Matrix4f kM)
kM
- first input matrixpublic Matrix4f multLeft(Matrix4f kM)
kM
- first input matrixpublic void MultLeft(Vector4f kIn, Vector4f rkOut)
kIn
- vectorrkOut
- vector = kIn^T * thispublic void multLeft(Vector4f kIn, Vector4f rkOut)
kIn
- vectorrkOut
- vector = kIn^T * thispublic Vector4f multLeft(Vector4f kIn)
kIn
- vectorrkOut
- vector = kIn^T * thispublic void MultRight(Vector4f kIn, Vector4f kOut)
kIn
- input vectorkOut
- output vector = this * vpublic void multRight(Vector4f kIn, Vector4f kOut)
kIn
- input vectorkOut
- output vector = this * vpublic Vector4f multRight(Vector4f kIn)
kIn
- input vectorkOut
- output vector = this * vpublic float QForm(Vector4f rkU, Vector4f rkV)
rkU
- urkV
- vpublic float qForm(Vector4f rkU, Vector4f rkV)
rkU
- urkV
- vpublic final void Set(float fM00, float fM01, float fM02, float fM03, float fM10, float fM11, float fM12, float fM13, float fM20, float fM21, float fM22, float fM23, float fM30, float fM31, float fM32, float fM33)
fM00
- matrix[0] entryfM01
- matrix[1] entryfM02
- matrix[2] entryfM03
- matrix[3] entryfM10
- matrix[4] entryfM11
- matrix[5] entryfM12
- matrix[6] entryfM13
- matrix[7] entryfM20
- matrix[8] entryfM21
- matrix[9] entryfM22
- matrix[10] entryfM23
- matrix[11] entryfM30
- matrix[12] entryfM31
- matrix[13] entryfM32
- matrix[14] entryfM33
- matrix[15] entrypublic Matrix4f set(float fM00, float fM01, float fM02, float fM03, float fM10, float fM11, float fM12, float fM13, float fM20, float fM21, float fM22, float fM23, float fM30, float fM31, float fM32, float fM33)
fM00
- matrix[0] entryfM01
- matrix[1] entryfM02
- matrix[2] entryfM03
- matrix[3] entryfM10
- matrix[4] entryfM11
- matrix[5] entryfM12
- matrix[6] entryfM13
- matrix[7] entryfM20
- matrix[8] entryfM21
- matrix[9] entryfM22
- matrix[10] entryfM23
- matrix[11] entryfM30
- matrix[12] entryfM31
- matrix[13] entryfM32
- matrix[14] entryfM33
- matrix[15] entrypublic final void Set(int iRow, int iCol, float fValue)
iRow
- row to setiCol
- column to setfValue
- new valuepublic Matrix4f set(int iRow, int iCol, float fValue)
iRow
- row to setiCol
- column to setfValue
- new valuepublic void TimesTranspose(Matrix4f kM)
kM
- matrixpublic Matrix4f timesTranspose(Matrix4f kM)
kM
- matrixpublic String toString()
public void Transpose()
public Matrix4f transpose()
public void Transpose(Matrix4f kM)
public static Matrix4f transpose(Matrix4f kM)
public void TransposeTimes(Matrix4f kM)
kM
- matrixpublic Matrix4f transposeTimes(Matrix4f kM)
kM
- matrixpublic void TransposeTimes(Matrix4f kM1, Matrix4f kM2)
kM1
- matrixkM2
- matrix