Assimp  v3.1.1 (June 2014)
jassimp.AiMatrix4f Class Reference

Simple 4x4 matrix of floats. More...

Public Member Functions

 AiMatrix4f (float[] data)
 Wraps the given array of floats as matrix. More...
 
float get (int row, int col)
 Gets an element of the matrix. More...
 
FloatBuffer toByteBuffer ()
 Stores the matrix in a new direct ByteBuffer with native byte order. More...
 
String toString ()
 

Detailed Description

Simple 4x4 matrix of floats.

Constructor & Destructor Documentation

§ AiMatrix4f()

jassimp.AiMatrix4f.AiMatrix4f ( float []  data)
inline

Wraps the given array of floats as matrix.

The array must have exactly 16 entries. The data in the array must be in row-major order.

Parameters
datathe array to wrap, may not be null

Member Function Documentation

§ get()

float jassimp.AiMatrix4f.get ( int  row,
int  col 
)
inline

Gets an element of the matrix.

Parameters
rowthe row
colthe column
Returns
the element at the given position

§ toByteBuffer()

FloatBuffer jassimp.AiMatrix4f.toByteBuffer ( )
inline

Stores the matrix in a new direct ByteBuffer with native byte order.

The returned buffer can be passed to rendering APIs such as LWJGL, e.g., as parameter for GL20.glUniformMatrix4(). Be sure to set transpose to true in this case, as OpenGL expects the matrix in column order.

Returns
a new native order, direct ByteBuffer

§ toString()

String jassimp.AiMatrix4f.toString ( )
inline

The documentation for this class was generated from the following file: