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 void
addChild(Transformation child)
void
addPosX(float val)
void
addPosY(float val)
void
addPosZ(float val)
void
addRotX(float val)
void
addRotY(float val)
void
addRotZ(float val)
void
addScaleX(float val)
void
addScaleY(float val)
void
addScaleZ(float val)
float
getGlobalScaleX()
Get the global x scale of this transformation matrix.float
getPosX()
float
getPosY()
float
getPosZ()
float
getRotX()
float
getRotY()
float
getRotZ()
float
getScaleX()
float
getScaleY()
float
getScaleZ()
javax.vecmath.Matrix4f
getTransMat()
float[]
getTransMatArr()
void
removeChild(Transformation child)
void
setFromRigidBody(com.bulletphysics.dynamics.RigidBody rb)
Setting transformation matrix to rigid body transformation matrixvoid
setPosX(float val)
void
setPosY(float val)
void
setPosZ(float val)
void
setRotX(float val)
void
setRotY(float val)
void
setRotZ(float val)
void
setScaleX(float val)
void
setScaleY(float val)
void
setScaleZ(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
-
-