|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.lwjgl.util.vector.Matrix
org.lwjgl.util.vector.Matrix4f
public class Matrix4f
Holds a 4x4 float matrix.
Field Summary | |
---|---|
float |
m00
|
float |
m01
|
float |
m02
|
float |
m03
|
float |
m10
|
float |
m11
|
float |
m12
|
float |
m13
|
float |
m20
|
float |
m21
|
float |
m22
|
float |
m23
|
float |
m30
|
float |
m31
|
float |
m32
|
float |
m33
|
Constructor Summary | |
---|---|
Matrix4f()
Construct a new matrix, initialized to the identity. |
Method Summary | |
---|---|
static Matrix4f |
add(Matrix4f left,
Matrix4f right,
Matrix4f dest)
Add two matrices together and place the result in a third matrix. |
float |
determinant()
|
Matrix |
invert()
Invert this matrix |
static Matrix4f |
invert(Matrix4f src,
Matrix4f dest)
Invert the source matrix and put the result in the destination |
Matrix |
load(java.nio.FloatBuffer buf)
Load from a float buffer. |
Matrix4f |
load(Matrix4f src)
Load from another matrix4f |
static Matrix4f |
load(Matrix4f src,
Matrix4f dest)
Copy the source matrix to the destination matrix |
Matrix |
loadTranspose(java.nio.FloatBuffer buf)
Load from a float buffer. |
static Matrix4f |
mul(Matrix4f left,
Matrix4f right,
Matrix4f dest)
Multiply the right matrix by the left and place the result in a third matrix. |
Matrix |
negate()
Negate this matrix |
Matrix4f |
negate(Matrix4f dest)
Negate this matrix and place the result in a destination matrix. |
static Matrix4f |
negate(Matrix4f src,
Matrix4f dest)
Negate this matrix and place the result in a destination matrix. |
Matrix4f |
rotate(float angle,
Vector3f axis)
Rotates the matrix around the given axis the specified angle |
Matrix4f |
rotate(float angle,
Vector3f axis,
Matrix4f dest)
Rotates the matrix around the given axis the specified angle |
static Matrix4f |
rotate(float angle,
Vector3f axis,
Matrix4f src,
Matrix4f dest)
Rotates the source matrix around the given axis the specified angle and put the result in the destination matrix. |
Matrix4f |
scale(Vector3f vec)
Scales this matrix |
static Matrix4f |
scale(Vector3f vec,
Matrix4f src,
Matrix4f dest)
Scales the source matrix and put the result in the destination matrix |
Matrix |
setIdentity()
Set this matrix to be the identity matrix. |
static Matrix4f |
setIdentity(Matrix4f m)
Set the given matrix to be the identity matrix. |
Matrix |
setZero()
Set this matrix to 0. |
static Matrix4f |
setZero(Matrix4f m)
Set the given matrix to 0. |
Matrix |
store(java.nio.FloatBuffer buf)
Store this matrix in a float buffer. |
Matrix |
storeTranspose(java.nio.FloatBuffer buf)
Store this matrix in a float buffer. |
static Matrix4f |
sub(Matrix4f left,
Matrix4f right,
Matrix4f dest)
Subtract the right matrix from the left and place the result in a third matrix. |
java.lang.String |
toString()
Returns a string representation of this matrix |
static Vector4f |
transform(Matrix4f left,
Vector4f right,
Vector4f dest)
Transform a Vector by a matrix and return the result in a destination vector. |
Matrix4f |
translate(Vector2f vec)
Translate this matrix |
Matrix4f |
translate(Vector2f vec,
Matrix4f dest)
Translate this matrix and stash the result in another matrix |
static Matrix4f |
translate(Vector2f vec,
Matrix4f src,
Matrix4f dest)
Translate the source matrix and stash the result in the destination matrix |
Matrix4f |
translate(Vector3f vec)
Translate this matrix |
Matrix4f |
translate(Vector3f vec,
Matrix4f dest)
Translate this matrix and stash the result in another matrix |
static Matrix4f |
translate(Vector3f vec,
Matrix4f src,
Matrix4f dest)
Translate the source matrix and stash the result in the destination matrix |
Matrix |
transpose()
Transpose this matrix |
Matrix4f |
transpose(Matrix4f dest)
Transpose this matrix and place the result in another matrix |
static Matrix4f |
transpose(Matrix4f src,
Matrix4f dest)
Transpose the source matrix and place the result in the destination matrix |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public Matrix4f()
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public Matrix setIdentity()
setIdentity
in class Matrix
public static Matrix4f setIdentity(Matrix4f m)
m
- The matrix to set to the identity
public Matrix setZero()
setZero
in class Matrix
public static Matrix4f setZero(Matrix4f m)
m
- The matrix to set to 0
public Matrix4f load(Matrix4f src)
src
- The source matrix
public static Matrix4f load(Matrix4f src, Matrix4f dest)
src
- The source matrixdest
- The destination matrix, or null of a new one is to be created
public Matrix load(java.nio.FloatBuffer buf)
load
in class Matrix
buf
- A float buffer to read from
public Matrix loadTranspose(java.nio.FloatBuffer buf)
loadTranspose
in class Matrix
buf
- A float buffer to read from
public Matrix store(java.nio.FloatBuffer buf)
store
in class Matrix
buf
- The buffer to store this matrix in
public Matrix storeTranspose(java.nio.FloatBuffer buf)
storeTranspose
in class Matrix
buf
- The buffer to store this matrix in
public static Matrix4f add(Matrix4f left, Matrix4f right, Matrix4f dest)
left
- The left source matrixright
- The right source matrixdest
- The destination matrix, or null if a new one is to be created
public static Matrix4f sub(Matrix4f left, Matrix4f right, Matrix4f dest)
left
- The left source matrixright
- The right source matrixdest
- The destination matrix, or null if a new one is to be created
public static Matrix4f mul(Matrix4f left, Matrix4f right, Matrix4f dest)
left
- The left source matrixright
- The right source matrixdest
- The destination matrix, or null if a new one is to be created
public static Vector4f transform(Matrix4f left, Vector4f right, Vector4f dest)
left
- The left matrixright
- The right vectordest
- The destination vector, or null if a new one is to be created
public Matrix transpose()
transpose
in class Matrix
public Matrix4f translate(Vector2f vec)
vec
- The vector to translate by
public Matrix4f translate(Vector3f vec)
vec
- The vector to translate by
public Matrix4f scale(Vector3f vec)
vec
- The vector to scale by
public static Matrix4f scale(Vector3f vec, Matrix4f src, Matrix4f dest)
vec
- The vector to scale bysrc
- The source matrixdest
- The destination matrix, or null if a new matrix is to be created
public Matrix4f rotate(float angle, Vector3f axis)
angle
- the angle, in radians.axis
- The vector representing the rotation axis. Must be normalized.
public Matrix4f rotate(float angle, Vector3f axis, Matrix4f dest)
angle
- the angle, in radians.axis
- The vector representing the rotation axis. Must be normalized.dest
- The matrix to put the result, or null if a new matrix is to be created
public static Matrix4f rotate(float angle, Vector3f axis, Matrix4f src, Matrix4f dest)
angle
- the angle, in radians.axis
- The vector representing the rotation axis. Must be normalized.src
- The matrix to rotatedest
- The matrix to put the result, or null if a new matrix is to be created
public Matrix4f translate(Vector3f vec, Matrix4f dest)
vec
- The vector to translate bydest
- The destination matrix or null if a new matrix is to be created
public static Matrix4f translate(Vector3f vec, Matrix4f src, Matrix4f dest)
vec
- The vector to translate bysrc
- The source matrixdest
- The destination matrix or null if a new matrix is to be created
public Matrix4f translate(Vector2f vec, Matrix4f dest)
vec
- The vector to translate bydest
- The destination matrix or null if a new matrix is to be created
public static Matrix4f translate(Vector2f vec, Matrix4f src, Matrix4f dest)
vec
- The vector to translate bysrc
- The source matrixdest
- The destination matrix or null if a new matrix is to be created
public Matrix4f transpose(Matrix4f dest)
dest
- The destination matrix or null if a new matrix is to be created
public static Matrix4f transpose(Matrix4f src, Matrix4f dest)
src
- The source matrixdest
- The destination matrix or null if a new matrix is to be created
public float determinant()
determinant
in class Matrix
public Matrix invert()
invert
in class Matrix
public static Matrix4f invert(Matrix4f src, Matrix4f dest)
src
- The source matrixdest
- The destination matrix, or null if a new matrix is to be created
public Matrix negate()
negate
in class Matrix
public Matrix4f negate(Matrix4f dest)
dest
- The destination matrix, or null if a new matrix is to be created
public static Matrix4f negate(Matrix4f src, Matrix4f dest)
src
- The source matrixdest
- The destination matrix, or null if a new matrix is to be created
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |