|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object glmodel.GL_Matrix
public class GL_Matrix
Define a 4x4 matrix, and provide functions to create common matrices for 3D operations, such as rotate, scale and translate.
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 | |
---|---|
GL_Matrix()
Default to the identity matrix |
|
GL_Matrix(GL_Vector right,
GL_Vector up,
GL_Vector forward)
Create a matrix with the three given axes |
Method Summary | |
---|---|
static void |
createBillboardMatrix(java.nio.FloatBuffer matrix,
GL_Vector right,
GL_Vector up,
GL_Vector look,
GL_Vector pos)
vCreate the billboard matrix: a rotation matrix created from an arbitrary set of axis. |
float[][] |
exportToArray()
return a two dimensional float array containing this Matrix |
GL_Matrix |
getClone()
return a copy of this matrix |
void |
importFromArray(float[][] data)
copy a two dimensional float array into this Matrix |
GL_Matrix |
inverse()
return the inverse of this matrix |
static GL_Matrix |
multiply(GL_Matrix m1,
GL_Matrix m2)
Multiply the two matrices. |
void |
preTransform(GL_Matrix n)
transforms this matrix by matrix n from right (this=this x n) |
void |
reset()
reset to the identity matrix |
void |
rotate(float dx,
float dy,
float dz)
|
static GL_Matrix |
rotateMatrix(float dx,
float dy,
float dz)
create a rotation matrix |
void |
rotateSelf(float dx,
float dy,
float dz)
|
void |
scale(float d)
|
void |
scale(float dx,
float dy,
float dz)
|
static GL_Matrix |
scaleMatrix(float d)
create a Matrix to scale all axes equally |
static GL_Matrix |
scaleMatrix(float dx,
float dy,
float dz)
create a Matrix to change scale |
void |
scaleSelf(float d)
|
void |
scaleSelf(float dx,
float dy,
float dz)
|
java.lang.String |
toString()
return a string representation of this matrix |
void |
transform(GL_Matrix n)
transforms this matrix by matrix n from left (this=n x this) |
GL_Vector |
transform(GL_Vector v)
Transform the given vector using this matrix. |
void |
translate(float dx,
float dy,
float dz)
|
static GL_Matrix |
translateMatrix(float dx,
float dy,
float dz)
create a Matrix shifted by the given amounts |
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 GL_Matrix()
public GL_Matrix(GL_Vector right, GL_Vector up, GL_Vector forward)
Method Detail |
---|
public void importFromArray(float[][] data)
public float[][] exportToArray()
public static GL_Matrix translateMatrix(float dx, float dy, float dz)
public static GL_Matrix scaleMatrix(float dx, float dy, float dz)
public static GL_Matrix scaleMatrix(float d)
public static GL_Matrix rotateMatrix(float dx, float dy, float dz)
public void translate(float dx, float dy, float dz)
public void scale(float dx, float dy, float dz)
public void scale(float d)
public void rotate(float dx, float dy, float dz)
public void scaleSelf(float dx, float dy, float dz)
public void scaleSelf(float d)
public void rotateSelf(float dx, float dy, float dz)
public void reset()
public GL_Vector transform(GL_Vector v)
v
- GL_Vector to be transformed
public void transform(GL_Matrix n)
public void preTransform(GL_Matrix n)
public static GL_Matrix multiply(GL_Matrix m1, GL_Matrix m2)
public java.lang.String toString()
toString
in class java.lang.Object
public GL_Matrix getClone()
public GL_Matrix inverse()
public static void createBillboardMatrix(java.nio.FloatBuffer matrix, GL_Vector right, GL_Vector up, GL_Vector look, GL_Vector pos)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |