|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmodel.Transformation
public class Transformation
Keeps track of the transformations made in terms of scale, rotation, and translation, as well as maintaining a transformation matrix.
| Constructor Summary | |
|---|---|
Transformation()
Creates a new transformation with default values. |
|
| Method Summary | |
|---|---|
float[] |
getRotation()
Returns the rotation amounts in a float array. |
float[] |
getScale()
Returns the scale amounts in a float array. |
Transformation |
getTransformation()
Returns a deep copy of this transformation object. |
float[] |
getTranslation()
Returns the translation amounts in a float array. |
Matrix4x4f |
getTransMatrix()
If the current transformation matrix isn't up to date, it updates it before returning it. |
void |
reset()
Resets the transformation to the default values: translation = rotation = 0.0 for x,y,z scale = 1.0 for x,y,z matrix = identity matrix |
void |
rotateBy(float rotX,
float rotY,
float rotZ)
Invokes a rotation on this transformation. |
void |
rotateTo(float rotX,
float rotY,
float rotZ)
Sets the rotation for this transformation to the specified amount. |
void |
scaleBy(float scaleX,
float scaleY,
float scaleZ)
Invokes a scale on this transformation. |
void |
scaleTo(float scaleX,
float scaleY,
float scaleZ)
Sets the scale for this transformation to the specified amount. |
void |
transformBy(float[] t,
float[] r,
float[] s)
Translates, rotates, and scales the transformation by the specified amounts. |
void |
transformTo(float[] t,
float[] r,
float[] s)
Sets the transformation's translation, rotation, and scale to the specified amounts. |
void |
translateBy(float transX,
float transY,
float transZ)
Invokes a translation on this transformation. |
void |
translateTo(float transX,
float transY,
float transZ)
Sets the translation for this transformation to the specified amount. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Transformation()
| Method Detail |
|---|
public void reset()
public Matrix4x4f getTransMatrix()
public Transformation getTransformation()
public float[] getTranslation()
public float[] getRotation()
public float[] getScale()
public void translateBy(float transX,
float transY,
float transZ)
transX - amount in x directiontransY - amount in y directiontransZ - amount in z direction
public void rotateBy(float rotX,
float rotY,
float rotZ)
rotX - amount around x axisrotY - amount around y axisrotZ - amount around z axis
public void scaleBy(float scaleX,
float scaleY,
float scaleZ)
scaleX - amount in x directionscaleY - amount in y directionscaleZ - amount in z direction
public void translateTo(float transX,
float transY,
float transZ)
transX - amount in x directiontransY - amount in y directiontransZ - amount in z direction
public void rotateTo(float rotX,
float rotY,
float rotZ)
rotX - amount around x axisrotY - amount around y axisrotZ - amount around z axis
public void scaleTo(float scaleX,
float scaleY,
float scaleZ)
scaleX - amount in x directionscaleY - amount in y directionscaleZ - amount in z direction
public void transformBy(float[] t,
float[] r,
float[] s)
t - amount to translate in each directionr - amount to rotate about each axiss - amount to scale in each direction
public void transformTo(float[] t,
float[] r,
float[] s)
t - amount to translate in each directionr - amount to rotate about each axiss - amount to scale in each direction
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||