Top Description Fields Constructors Methods
org.lwjgl.util.vector

public Class Matrix3f

extends Matrix
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.Serializable, java.nio.FloatBuffer

Holds a 3x3 matrix.
Author
cix_foo
Version
$Revision$ $Id$

Field Summary

Modifier and TypeField and Description
public float
public float
public float
public float
public float
public float
public float
public float
public float
private static final long

Constructor Summary

AccessConstructor and Description
public
Matrix3f()

Constructor for Matrix3f.

Method Summary

Modifier and TypeMethod and Description
public static Matrix3f

Returns:

the destination matrix
add
(Matrix3f
The left source matrix
left
,
Matrix3f
The right source matrix
right
,
Matrix3f
The destination matrix, or null if a new one is to be created
dest
)

Add two matrices together and place the result in a third matrix.

public float

Returns:

the determinant of the matrix
determinant
()

Implements abstract org.lwjgl.util.vector.Matrix.determinant.

public Matrix

Returns:

this if successful, null otherwise
invert
()

Implements abstract org.lwjgl.util.vector.Matrix.invert.

Invert this matrix
public static Matrix3f

Returns:

The inverted matrix if successful, null otherwise
invert
(Matrix3f
The source matrix to be inverted
src
,
Matrix3f
The destination matrix, or null if a new one is to be created
dest
)

Invert the source matrix and put the result into the destination matrix

public Matrix3f

Returns:

this
load
(Matrix3f
The source matrix
src
)

Load from another matrix

public static Matrix3f

Returns:

The copied matrix
load
(Matrix3f
The source matrix
src
,
Matrix3f
The destination matrix, or null of a new matrix is to be created
dest
)

Copy source matrix to destination matrix

public Matrix

Returns:

this
load
(FloatBuffer
A float buffer to read from
buf
)

Implements abstract org.lwjgl.util.vector.Matrix.load.

Load from a float buffer.
public Matrix

Returns:

this
loadTranspose
(FloatBuffer
A float buffer to read from
buf
)

Implements abstract org.lwjgl.util.vector.Matrix.loadTranspose.

Load from a float buffer.
public static Matrix3f

Returns:

the destination matrix
mul
(Matrix3f
The left source matrix
left
,
Matrix3f
The right source matrix
right
,
Matrix3f
The destination matrix, or null if a new one is to be created
dest
)

Multiply the right matrix by the left and place the result in a third matrix.

public Matrix

Returns:

this
negate
()

Implements abstract org.lwjgl.util.vector.Matrix.negate.

Negate this matrix
public Matrix3f

Returns:

the negated matrix
negate
(Matrix3f
The destination matrix, or null if a new matrix is to be created
dest
)

Negate this matrix and place the result in a destination matrix.

public static Matrix3f

Returns:

the negated matrix
negate
(Matrix3f
The source matrix
src
,
Matrix3f
The destination matrix, or null if a new matrix is to be created
dest
)

Negate the source matrix and place the result in the destination matrix.

public Matrix

Returns:

this
setIdentity
()

Implements abstract org.lwjgl.util.vector.Matrix.setIdentity.

Set this matrix to be the identity matrix.
public static Matrix3f

Returns:

m
setIdentity
(Matrix3f
The matrix to be set to the identity
m
)

Set the matrix to be the identity matrix.

public Matrix

Returns:

this
setZero
()

Implements abstract org.lwjgl.util.vector.Matrix.setZero.

Set this matrix to 0.
public static Matrix3f

Returns:

m
setZero
(Matrix3f
The matrix to be set to 0
m
)

Set the matrix matrix to 0.

public Matrix
store(FloatBuffer
The buffer to store this matrix in
buf
)

Implements abstract org.lwjgl.util.vector.Matrix.store.

Store this matrix in a float buffer.
public Matrix
storeTranspose(FloatBuffer
The buffer to store this matrix in
buf
)

Implements abstract org.lwjgl.util.vector.Matrix.storeTranspose.

Store this matrix in a float buffer.
public static Matrix3f

Returns:

the destination matrix
sub
(Matrix3f
The left source matrix
left
,
Matrix3f
The right source matrix
right
,
Matrix3f
The destination matrix, or null if a new one is to be created
dest
)

Subtract the right matrix from the left and place the result in a third matrix.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of this matrix
public static Vector3f

Returns:

the destination vector
transform
(Matrix3f
The left matrix
left
,
Vector3f
The right vector
right
,
Vector3f
The destination vector, or null if a new one is to be created
dest
)

Transform a Vector by a matrix and return the result in a destination vector.

public Matrix

Returns:

this
transpose
()

Implements abstract org.lwjgl.util.vector.Matrix.transpose.

Transpose this matrix
public Matrix3f

Returns:

the transposed matrix
transpose
(Matrix3f
The destination matrix or null if a new matrix is to be created
dest
)

Transpose this matrix and place the result in another matrix

public static Matrix3f

Returns:

the transposed matrix
transpose
(Matrix3f
The source matrix to be transposed
src
,
Matrix3f
The destination matrix or null if a new matrix is to be created
dest
)

Transpose the source matrix and place the result into the destination matrix

Field Detail

m00back to summary
public float m00
m01back to summary
public float m01
m02back to summary
public float m02
m10back to summary
public float m10
m11back to summary
public float m11
m12back to summary
public float m12
m20back to summary
public float m20
m21back to summary
public float m21
m22back to summary
public float m22
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

Matrix3fback to summary
public Matrix3f()

Constructor for Matrix3f. Matrix is initialised to the identity.

Method Detail

addback to summary
public static Matrix3f add(Matrix3f left, Matrix3f right, Matrix3f dest)

Add two matrices together and place the result in a third matrix.

Parameters
left:Matrix3f

The left source matrix

right:Matrix3f

The right source matrix

dest:Matrix3f

The destination matrix, or null if a new one is to be created

Returns:Matrix3f

the destination matrix

determinantback to summary
public float determinant()

Implements abstract org.lwjgl.util.vector.Matrix.determinant.

Returns:float

the determinant of the matrix

invertback to summary
public Matrix invert()

Implements abstract org.lwjgl.util.vector.Matrix.invert.

Invert this matrix

Returns:Matrix

this if successful, null otherwise

invertback to summary
public static Matrix3f invert(Matrix3f src, Matrix3f dest)

Invert the source matrix and put the result into the destination matrix

Parameters
src:Matrix3f

The source matrix to be inverted

dest:Matrix3f

The destination matrix, or null if a new one is to be created

Returns:Matrix3f

The inverted matrix if successful, null otherwise

loadback to summary
public Matrix3f load(Matrix3f src)

Load from another matrix

Parameters
src:Matrix3f

The source matrix

Returns:Matrix3f

this

loadback to summary
public static Matrix3f load(Matrix3f src, Matrix3f dest)

Copy source matrix to destination matrix

Parameters
src:Matrix3f

The source matrix

dest:Matrix3f

The destination matrix, or null of a new matrix is to be created

Returns:Matrix3f

The copied matrix

loadback to summary
public Matrix load(FloatBuffer buf)

Implements abstract org.lwjgl.util.vector.Matrix.load.

Load from a float buffer. The buffer stores the matrix in column major (OpenGL) order.

Parameters
buf:FloatBuffer

A float buffer to read from

Returns:Matrix

this

loadTransposeback to summary
public Matrix loadTranspose(FloatBuffer buf)

Implements abstract org.lwjgl.util.vector.Matrix.loadTranspose.

Load from a float buffer. The buffer stores the matrix in row major (maths) order.

Parameters
buf:FloatBuffer

A float buffer to read from

Returns:Matrix

this

mulback to summary
public static Matrix3f mul(Matrix3f left, Matrix3f right, Matrix3f dest)

Multiply the right matrix by the left and place the result in a third matrix.

Parameters
left:Matrix3f

The left source matrix

right:Matrix3f

The right source matrix

dest:Matrix3f

The destination matrix, or null if a new one is to be created

Returns:Matrix3f

the destination matrix

negateback to summary
public Matrix negate()

Implements abstract org.lwjgl.util.vector.Matrix.negate.

Negate this matrix

Returns:Matrix

this

negateback to summary
public Matrix3f negate(Matrix3f dest)

Negate this matrix and place the result in a destination matrix.

Parameters
dest:Matrix3f

The destination matrix, or null if a new matrix is to be created

Returns:Matrix3f

the negated matrix

negateback to summary
public static Matrix3f negate(Matrix3f src, Matrix3f dest)

Negate the source matrix and place the result in the destination matrix.

Parameters
src:Matrix3f

The source matrix

dest:Matrix3f

The destination matrix, or null if a new matrix is to be created

Returns:Matrix3f

the negated matrix

setIdentityback to summary
public Matrix setIdentity()

Implements abstract org.lwjgl.util.vector.Matrix.setIdentity.

Set this matrix to be the identity matrix.

Returns:Matrix

this

setIdentityback to summary
public static Matrix3f setIdentity(Matrix3f m)

Set the matrix to be the identity matrix.

Parameters
m:Matrix3f

The matrix to be set to the identity

Returns:Matrix3f

m

setZeroback to summary
public Matrix setZero()

Implements abstract org.lwjgl.util.vector.Matrix.setZero.

Set this matrix to 0.

Returns:Matrix

this

setZeroback to summary
public static Matrix3f setZero(Matrix3f m)

Set the matrix matrix to 0.

Parameters
m:Matrix3f

The matrix to be set to 0

Returns:Matrix3f

m

storeback to summary
public Matrix store(FloatBuffer buf)

Implements abstract org.lwjgl.util.vector.Matrix.store.

Store this matrix in a float buffer. The matrix is stored in column major (openGL) order.

Parameters
buf:FloatBuffer

The buffer to store this matrix in

Returns:Matrix

Doc from org.lwjgl.util.vector.Matrix.store.

this

storeTransposeback to summary
public Matrix storeTranspose(FloatBuffer buf)

Implements abstract org.lwjgl.util.vector.Matrix.storeTranspose.

Store this matrix in a float buffer. The matrix is stored in row major (maths) order.

Parameters
buf:FloatBuffer

The buffer to store this matrix in

Returns:Matrix

Doc from org.lwjgl.util.vector.Matrix.storeTranspose.

this

subback to summary
public static Matrix3f sub(Matrix3f left, Matrix3f right, Matrix3f dest)

Subtract the right matrix from the left and place the result in a third matrix.

Parameters
left:Matrix3f

The left source matrix

right:Matrix3f

The right source matrix

dest:Matrix3f

The destination matrix, or null if a new one is to be created

Returns:Matrix3f

the destination matrix

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representation of this matrix

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

transformback to summary
public static Vector3f transform(Matrix3f left, Vector3f right, Vector3f dest)

Transform a Vector by a matrix and return the result in a destination vector.

Parameters
left:Matrix3f

The left matrix

right:Vector3f

The right vector

dest:Vector3f

The destination vector, or null if a new one is to be created

Returns:Vector3f

the destination vector

transposeback to summary
public Matrix transpose()

Implements abstract org.lwjgl.util.vector.Matrix.transpose.

Transpose this matrix

Returns:Matrix

this

transposeback to summary
public Matrix3f transpose(Matrix3f dest)

Transpose this matrix and place the result in another matrix

Parameters
dest:Matrix3f

The destination matrix or null if a new matrix is to be created

Returns:Matrix3f

the transposed matrix

transposeback to summary
public static Matrix3f transpose(Matrix3f src, Matrix3f dest)

Transpose the source matrix and place the result into the destination matrix

Parameters
src:Matrix3f

The source matrix to be transposed

dest:Matrix3f

The destination matrix or null if a new matrix is to be created

Returns:Matrix3f

the transposed matrix