|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.ucm.look.ar.math.geom.Matrix3
public class Matrix3
Represent a 3D Matrix that can be used with OpenGL. It has functions to rotate, scale and translate
Constructor Summary | |
---|---|
Matrix3()
Constructs a matrix with the identity |
Method Summary | |
---|---|
float[] |
getMatrix()
Returns the float's array representing the matrix in the form: [ m0 m4 m8 m12 ]
[ m1 m5 m9 m13 ]
[ m2 m6 m10 m14 ]
[ m3 m7 m11 m15 ]
|
void |
postMultiply(float[] matrix)
Postmultiplies the current matrix with the given one |
void |
preMultipliy(float[] matrix)
Premultiplies the current matrix with the given one |
void |
rotate(float x,
float y,
float z)
Rotates the matrix with the given rotations (in radians) |
void |
scale(float x,
float y,
float z)
Scales the matrix with the given factors |
void |
set(float[] matrix)
|
void |
setIdentity()
Sets the identity for this matrix |
void |
transform(Point3 p)
|
void |
translate(float x,
float y,
float z)
Translates with the given parameters |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Matrix3()
Method Detail |
---|
public float[] getMatrix()
[ m0 m4 m8 m12 ]
[ m1 m5 m9 m13 ]
[ m2 m6 m10 m14 ]
[ m3 m7 m11 m15 ]
public void postMultiply(float[] matrix)
matrix
- matrix to postmultiplypublic void preMultipliy(float[] matrix)
matrix
- matrix to premultiplypublic void rotate(float x, float y, float z)
x
- rotation in x axisy
- rotation in y axisz
- rotation in z axispublic void scale(float x, float y, float z)
x
- scale in x axisy
- scale in y axisz
- scale in z axispublic void set(float[] matrix)
public void setIdentity()
public void transform(Point3 p)
public void translate(float x, float y, float z)
x
- translation in x axisy
- translation in y axisz
- translation in z axis
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |