public class OpenGLMatrix extends ColumnMajorMatrixF
OpenGLMatrix
is a 4x4 matrix commonly used as a transformation matrix for 3D
homogeneous coordinates. The data layout of an OpenGLMatrix
is used heavily in the
OpenGL high performance graphics standard.Matrix
,
Matrix
Constructor and Description |
---|
OpenGLMatrix() |
OpenGLMatrix(float[] data) |
OpenGLMatrix(Matrix44F matrix) |
Modifier and Type | Method and Description |
---|---|
MatrixF |
emptyMatrix(int numRows,
int numCols)
Returns a new empty matrix of the indicated dimensions.
|
float[] |
getData()
Returns the contiguous array of floats which is the storage for this matrix
|
static OpenGLMatrix |
identityMatrix() |
OpenGLMatrix |
inverted()
Returns a matrix which is the matrix-multiplication inverse of the receiver.
|
MatrixF |
multiplied(MatrixF him)
Returns a matrix which is the multiplication of the recevier with another matrix.
|
OpenGLMatrix |
multiplied(OpenGLMatrix him) |
void |
multiply(MatrixF him)
Updates the receiver to be the product of itself and another matrix.
|
void |
multiply(OpenGLMatrix him)
Updates the receiver to be the product of itself and another matrix.
|
void |
rotate(AngleUnit angleUnit,
float angle,
float dx,
float dy,
float dz) |
void |
rotate(AxesReference axesReference,
AxesOrder axesOrder,
AngleUnit angleUnit,
float first,
float second,
float third) |
OpenGLMatrix |
rotated(AngleUnit angleUnit,
float angle,
float dx,
float dy,
float dz) |
OpenGLMatrix |
rotated(AxesReference axesReference,
AxesOrder axesOrder,
AngleUnit angleUnit,
float first,
float second,
float third) |
static OpenGLMatrix |
rotation(AngleUnit angleUnit,
float angle,
float dx,
float dy,
float dz)
Creates a matrix for rotation by the indicated angle around the indicated vector.
|
static OpenGLMatrix |
rotation(AxesReference axesReference,
AxesOrder axesOrder,
AngleUnit angleUnit,
float first,
float second,
float third)
Creates a matrix for a rotation specified by three successive rotation angles.
|
void |
scale(float scale) |
void |
scale(float scaleX,
float scaleY,
float scaleZ) |
OpenGLMatrix |
scaled(float scale) |
OpenGLMatrix |
scaled(float scaleX,
float scaleY,
float scaleZ) |
void |
translate(float dx,
float dy,
float dz) |
OpenGLMatrix |
translated(float dx,
float dy,
float dz) |
static OpenGLMatrix |
translation(float dx,
float dy,
float dz) |
OpenGLMatrix |
transposed()
Returns a matrix which is the transposition of the receiver matrix.
|
indexFromRowCol, toVector
get, put
adaptHomogeneous, add, add, add, added, added, added, diagonalMatrix, diagonalMatrix, dimensionsError, dimensionsError, formatAsTransform, formatAsTransform, getColumn, getRow, getTranslation, identityMatrix, multiplied, multiplied, multiplied, multiply, multiply, multiply, numCols, numRows, slice, slice, subtract, subtract, subtract, subtracted, subtracted, subtracted, toString, transform
public OpenGLMatrix()
public OpenGLMatrix(float[] data)
public OpenGLMatrix(Matrix44F matrix)
public MatrixF emptyMatrix(int numRows, int numCols)
MatrixF
emptyMatrix
in class MatrixF
emptyMatrix(int, int)
public static OpenGLMatrix rotation(AngleUnit angleUnit, float angle, float dx, float dy, float dz)
public static OpenGLMatrix rotation(AxesReference axesReference, AxesOrder axesOrder, AngleUnit angleUnit, float first, float second, float third)
public static OpenGLMatrix translation(float dx, float dy, float dz)
public static OpenGLMatrix identityMatrix()
public float[] getData()
DenseMatrixF
getData
in class DenseMatrixF
@NonConst public void scale(float scaleX, float scaleY, float scaleZ)
@NonConst public void scale(float scale)
@NonConst public void translate(float dx, float dy, float dz)
@NonConst public void rotate(AxesReference axesReference, AxesOrder axesOrder, AngleUnit angleUnit, float first, float second, float third)
@Const public OpenGLMatrix scaled(float scaleX, float scaleY, float scaleZ)
@Const public OpenGLMatrix scaled(float scale)
@Const public OpenGLMatrix translated(float dx, float dy, float dz)
@Const public OpenGLMatrix rotated(AngleUnit angleUnit, float angle, float dx, float dy, float dz)
@Const public OpenGLMatrix rotated(AxesReference axesReference, AxesOrder axesOrder, AngleUnit angleUnit, float first, float second, float third)
@Const public OpenGLMatrix inverted()
MatrixF
@Const public OpenGLMatrix transposed()
MatrixF
transposed
in class MatrixF
@Const public OpenGLMatrix multiplied(OpenGLMatrix him)
@Const public MatrixF multiplied(MatrixF him)
MatrixF
multiplied
in class MatrixF
him
- the matrix with which the receiver is to be multiplied.@NonConst public void multiply(OpenGLMatrix him)
him
- the matrix with which the receiver is to be multiplied.