Package de.coreengine.rendering.model
Class Transformation
- java.lang.Object
-
- de.coreengine.rendering.model.Transformation
-
public class Transformation extends Object
Transformation class to store position, rotation and scale and calc the trasnformation matrix- Author:
- Darius Dinger
-
-
Constructor Summary
Constructors Constructor Description Transformation()Creating new transformation and init matrices
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(Transformation child)voidaddPosX(float val)voidaddPosY(float val)voidaddPosZ(float val)voidaddRotX(float val)voidaddRotY(float val)voidaddRotZ(float val)voidaddScaleX(float val)voidaddScaleY(float val)voidaddScaleZ(float val)floatgetGlobalScaleX()Get the global x scale of this transformation matrix.floatgetPosX()floatgetPosY()floatgetPosZ()floatgetRotX()floatgetRotY()floatgetRotZ()floatgetScaleX()floatgetScaleY()floatgetScaleZ()javax.vecmath.Matrix4fgetTransMat()float[]getTransMatArr()voidremoveChild(Transformation child)voidsetFromRigidBody(com.bulletphysics.dynamics.RigidBody rb)Setting transformation matrix to rigid body transformation matrixvoidsetPosX(float val)voidsetPosY(float val)voidsetPosZ(float val)voidsetRotX(float val)voidsetRotY(float val)voidsetRotZ(float val)voidsetScaleX(float val)voidsetScaleY(float val)voidsetScaleZ(float val)
-
-
-
Method Detail
-
addChild
public void addChild(Transformation child)
-
removeChild
public void removeChild(Transformation child)
-
getTransMatArr
public float[] getTransMatArr()
- Returns:
- Actual transformation matrix as array
-
getTransMat
public javax.vecmath.Matrix4f getTransMat()
- Returns:
- Actual transformation matrix for this transformation
-
setFromRigidBody
public void setFromRigidBody(com.bulletphysics.dynamics.RigidBody rb)
Setting transformation matrix to rigid body transformation matrix- Parameters:
rb- Rigid body to get transformation matrix from
-
getPosX
public float getPosX()
- Returns:
- X Translation of the transformation
-
getPosY
public float getPosY()
- Returns:
- Y Translation of the transformation
-
getPosZ
public float getPosZ()
- Returns:
- Z Translation of the transformation
-
getScaleX
public float getScaleX()
- Returns:
- X Scale of the transformation
-
getGlobalScaleX
public float getGlobalScaleX()
Get the global x scale of this transformation matrix. Performance intensive!- Returns:
- Global scale x
-
getScaleY
public float getScaleY()
- Returns:
- Y Scale of the transformation
-
getScaleZ
public float getScaleZ()
- Returns:
- Z Scale of the transformation
-
getRotX
public float getRotX()
- Returns:
- X Rotation of the transformation
-
getRotY
public float getRotY()
- Returns:
- Y Rotation of the transformation
-
getRotZ
public float getRotZ()
- Returns:
- Z Rotation of the transformation
-
setPosX
public void setPosX(float val)
- Parameters:
val- new X Translation of the transformation
-
setPosY
public void setPosY(float val)
- Parameters:
val- new Y Translation of the transformation
-
setPosZ
public void setPosZ(float val)
- Parameters:
val- new Z Translation of the transformation
-
setScaleX
public void setScaleX(float val)
- Parameters:
val- new X Scale of the transformation
-
setScaleY
public void setScaleY(float val)
- Parameters:
val- new Y Scale of the transformation
-
setScaleZ
public void setScaleZ(float val)
- Parameters:
val- new Z Scale of the transformation
-
setRotX
public void setRotX(float val)
- Parameters:
val- new X Rotation of the transformation
-
setRotY
public void setRotY(float val)
- Parameters:
val- new Y Rotation of the transformation
-
setRotZ
public void setRotZ(float val)
- Parameters:
val- new Z Rotation of the transformation
-
addPosX
public void addPosX(float val)
- Parameters:
val- Value to add to the X Translation of the transformation
-
addPosY
public void addPosY(float val)
- Parameters:
val- Value to add to the Y Translation of the transformation
-
addPosZ
public void addPosZ(float val)
- Parameters:
val- Value to add to the Z Translation of the transformation
-
addScaleX
public void addScaleX(float val)
- Parameters:
val- Value to add to the X Scale of the transformation
-
addScaleY
public void addScaleY(float val)
- Parameters:
val- Value to add to the Y Scale of the transformation
-
addScaleZ
public void addScaleZ(float val)
- Parameters:
val- Value to add to the Z Scale of the transformation
-
addRotX
public void addRotX(float val)
- Parameters:
val- Value to add to the X Rotation of the transformation
-
addRotY
public void addRotY(float val)
- Parameters:
val- Value to add to the Y Rotation of the transformation
-
addRotZ
public void addRotZ(float val)
- Parameters:
val- Value to add to the Z Rotation of the transformation
-
-