Class Matrix
- java.lang.Object
-
- net.lax1dude.eaglercraft.v1_8.vector.Matrix
-
- All Implemented Interfaces:
java.io.Serializable
public abstract class Matrix extends java.lang.Object implements java.io.SerializableBase class for matrices. When a matrix is constructed it will be the identity matrix unless otherwise stated.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMatrix()Constructor for Matrix.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract floatdeterminant()abstract Matrixinvert()Invert this matrixabstract Matrixload(FloatBuffer buf)Load from a float buffer.abstract MatrixloadTranspose(FloatBuffer buf)Load from a float buffer.abstract Matrixnegate()Negate this matrixabstract MatrixsetIdentity()Set this matrix to be the identity matrix.abstract MatrixsetZero()Set this matrix to 0.abstract Matrixstore(FloatBuffer buf)Store this matrix in a float buffer.abstract MatrixstoreTranspose(FloatBuffer buf)Store this matrix in a float buffer.abstract Matrixtranspose()Transpose this matrix
-
-
-
Method Detail
-
setIdentity
public abstract Matrix setIdentity()
Set this matrix to be the identity matrix.- Returns:
- this
-
invert
public abstract Matrix invert()
Invert this matrix- Returns:
- this
-
load
public abstract Matrix load(FloatBuffer buf)
Load from a float buffer. The buffer stores the matrix in column major (OpenGL) order.- Parameters:
buf- A float buffer to read from- Returns:
- this
-
loadTranspose
public abstract Matrix loadTranspose(FloatBuffer buf)
Load from a float buffer. The buffer stores the matrix in row major (mathematical) order.- Parameters:
buf- A float buffer to read from- Returns:
- this
-
negate
public abstract Matrix negate()
Negate this matrix- Returns:
- this
-
store
public abstract Matrix store(FloatBuffer buf)
Store this matrix in a float buffer. The matrix is stored in column major (openGL) order.- Parameters:
buf- The buffer to store this matrix in- Returns:
- this
-
storeTranspose
public abstract Matrix storeTranspose(FloatBuffer buf)
Store this matrix in a float buffer. The matrix is stored in row major (maths) order.- Parameters:
buf- The buffer to store this matrix in- Returns:
- this
-
transpose
public abstract Matrix transpose()
Transpose this matrix- Returns:
- this
-
setZero
public abstract Matrix setZero()
Set this matrix to 0.- Returns:
- this
-
determinant
public abstract float determinant()
- Returns:
- the determinant of the matrix
-
-