org.xith3d.schedops.movement
Class TransformationDirectives

java.lang.Object
  extended by org.xith3d.schedops.movement.TransformationDirectives

public class TransformationDirectives
extends java.lang.Object

This class may serve as a base for classes to describe the transformation speed by the three carthesian axes or a user-defined axis.


Nested Class Summary
static class TransformationDirectives.Axes
          The axes of a carthesian coordinate system.
static class TransformationDirectives.AxisOrder
          The order in which to rotate around the axes.
 
Constructor Summary
TransformationDirectives()
          Creates a new TransformationDirectives instance with all values set to zero.
TransformationDirectives(float speedX, float speedY, float speedZ)
          Creates a new TransformationDirectives instance.
TransformationDirectives(float initValueX, float initValueY, float initValueZ, float speedX, float speedY, float speedZ)
          Creates a new TransformationDirectives instance.
TransformationDirectives(float initValueX, float initValueY, float initValueZ, float speedX, float speedY, float speedZ, TransformationDirectives.AxisOrder axisOrder)
          Creates a new TransformationDirectives instance.
TransformationDirectives(float speedX, float speedY, float speedZ, TransformationDirectives.AxisOrder axisOrder)
          Creates a new TransformationDirectives instance.
TransformationDirectives(TransformationDirectives.AxisOrder axisOrder)
          Creates a new TransformationDirectives instance.
TransformationDirectives(org.openmali.vecmath2.Vector3f userAxis)
          Creates a new TransformationDirectives instance.
TransformationDirectives(org.openmali.vecmath2.Vector3f userAxis, float speed)
          Creates a new TransformationDirectives instance.
TransformationDirectives(org.openmali.vecmath2.Vector3f userAxis, float initValue, float speed)
          Creates a new TransformationDirectives instance.
 
Method Summary
 TransformationDirectives.AxisOrder getAxisOrder()
           
 float getInitValue()
           
 float getInitValue(TransformationDirectives.Axes axis)
           
 float getInitValueUser()
           
 float getInitValueX()
           
 float getInitValueY()
           
 float getInitValueZ()
           
 float getSpeed()
          Returns the speed by the user-defined axis.
 float getSpeed(TransformationDirectives.Axes axis)
          Returns the speed by the specified axis.
 float getSpeedUser()
           
 float getSpeedX()
           
 float getSpeedY()
           
 float getSpeedZ()
           
 org.openmali.vecmath2.Vector3f getUserAxis()
           
 boolean isDirty()
           
 void setAxisOrder(TransformationDirectives.AxisOrder axisOrder)
          Sets in which order the transformation is to be applied.
 void setClean()
           
 void setInitValue(float value)
          Sets the initial transformation value by the user-defined axis.
 void setInitValue(TransformationDirectives.Axes axis, float value)
          Sets the initial transformation value by the specified axis.
 void setInitValueUser(float value)
          Sets the initial transformation value by the user-defined-axis (1.0f is 360 degree).
 void setInitValueX(float value)
          Sets the initial transformation value by the x-axis (1.0f is 360 degree).
 void setInitValueY(float value)
          Sets the initial transformation value by the y-axis (1.0f is 360 degree).
 void setInitValueZ(float value)
          Sets the initial transformation value by the z-axis (1.0f is 360 degree).
 void setSpeed(float value)
          Sets the speed by the user-defined axis.
 void setSpeed(TransformationDirectives.Axes axis, float value)
          Sets the speed by the specified axis.
 void setSpeedUser(float speed)
          Sets the speed by the user-defined-axis (e.g. rotations per second).
 void setSpeedX(float speed)
          Sets the speed by the x-axis (e.g. rotations per second).
 void setSpeedY(float speed)
          Sets the speed by the y-axis (e.g. rotations per second).
 void setSpeedZ(float speed)
          Sets the speed by the z-axis (e.g. rotations per second).
 void setUserAxis(org.openmali.vecmath2.Vector3f userAxis)
          Sets the user-defined axis to transform by.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformationDirectives

public TransformationDirectives(org.openmali.vecmath2.Vector3f userAxis,
                                float initValue,
                                float speed)
Creates a new TransformationDirectives instance.

Parameters:
userAxis - the axis by which to transform
initValue - the initial transformation by the user-defined-axis (e.g. 1.0f is 360 degree)
speed - the speed by the user-defined-axis (e.g. 1.0f is one turn per second)

TransformationDirectives

public TransformationDirectives(org.openmali.vecmath2.Vector3f userAxis,
                                float speed)
Creates a new TransformationDirectives instance.

Parameters:
userAxis - the axis around which to rotate
speed - the speed by the user-defined-axis (e.g. 1.0f is one turn per second)

TransformationDirectives

public TransformationDirectives(org.openmali.vecmath2.Vector3f userAxis)
Creates a new TransformationDirectives instance.

Parameters:
userAxis - the axis around which to rotate

TransformationDirectives

public TransformationDirectives(float initValueX,
                                float initValueY,
                                float initValueZ,
                                float speedX,
                                float speedY,
                                float speedZ,
                                TransformationDirectives.AxisOrder axisOrder)
Creates a new TransformationDirectives instance.

Parameters:
initValueX - the initial value by the x-axis (e.g. 1.0f is 360 degree)
initValueY - the initial rotation around the y-axis (e.g. 1.0f is 360 degree)
initValueZ - the initial rotation around the z-axis (e.g. 1.0f is 360 degree)
speedX - the rotation speed around the x-axis (e.g. 1.0f is one turn per second)
speedY - the rotation speed around the y-axis (e.g. 1.0f is one turn per second)
speedZ - the rotation speed around the z-axis (e.g. 1.0f is one turn per second)
axisOrder - the order in which the axes are to rotate around

TransformationDirectives

public TransformationDirectives(float initValueX,
                                float initValueY,
                                float initValueZ,
                                float speedX,
                                float speedY,
                                float speedZ)
Creates a new TransformationDirectives instance.

Parameters:
initValueX - the initial value by the x-axis (e.g. 1.0f is 360 degree)
initValueY - the initial rotation around the y-axis (e.g. 1.0f is 360 degree)
initValueZ - the initial rotation around the z-axis (e.g. 1.0f is 360 degree)
speedX - the rotation speed around the x-axis (e.g. 1.0f is one turn per second)
speedY - the rotation speed around the y-axis (e.g. 1.0f is one turn per second)
speedZ - the rotation speed around the z-axis (e.g. 1.0f is one turn per second)

TransformationDirectives

public TransformationDirectives(float speedX,
                                float speedY,
                                float speedZ,
                                TransformationDirectives.AxisOrder axisOrder)
Creates a new TransformationDirectives instance.

Parameters:
speedX - the rotation speed around the x-axis (1.0f is one turn per second)
speedY - the rotation speed around the y-axis (1.0f is one turn per second)
speedZ - the rotation speed around the z-axis (1.0f is one turn per second)
axisOrder - the order in which the axes are to transformed by

TransformationDirectives

public TransformationDirectives(float speedX,
                                float speedY,
                                float speedZ)
Creates a new TransformationDirectives instance.

Parameters:
speedX - the transformation speed by the x-axis (1.0f is one turn per second)
speedY - the transformation speed by the y-axis (1.0f is one turn per second)
speedZ - the transformation speed by the z-axis (1.0f is one turn per second)

TransformationDirectives

public TransformationDirectives(TransformationDirectives.AxisOrder axisOrder)
Creates a new TransformationDirectives instance.

Parameters:
axisOrder - the order in which the axes are to translated by

TransformationDirectives

public TransformationDirectives()
Creates a new TransformationDirectives instance with all values set to zero.

Method Detail

setClean

public final void setClean()

isDirty

public final boolean isDirty()

getAxisOrder

public TransformationDirectives.AxisOrder getAxisOrder()
Returns:
in which order the transformation is to be applied

setAxisOrder

public void setAxisOrder(TransformationDirectives.AxisOrder axisOrder)
Sets in which order the transformation is to be applied.


getUserAxis

public org.openmali.vecmath2.Vector3f getUserAxis()
Returns:
the user-defined axis to transform by

setUserAxis

public void setUserAxis(org.openmali.vecmath2.Vector3f userAxis)
Sets the user-defined axis to transform by.


setInitValueX

public void setInitValueX(float value)
Sets the initial transformation value by the x-axis (1.0f is 360 degree).


getInitValueX

public float getInitValueX()
Returns:
the initial transformation value by the x-axis (1.0f is 360 degree)

setInitValueY

public void setInitValueY(float value)
Sets the initial transformation value by the y-axis (1.0f is 360 degree).


getInitValueY

public float getInitValueY()
Returns:
the initial transformation value by the y-axis (1.0f is 360 degree)

setInitValueZ

public void setInitValueZ(float value)
Sets the initial transformation value by the z-axis (1.0f is 360 degree).


getInitValueZ

public float getInitValueZ()
Returns:
the initial transformation value by the z-axis (1.0f is 360 degree)

setInitValueUser

public void setInitValueUser(float value)
Sets the initial transformation value by the user-defined-axis (1.0f is 360 degree).


getInitValueUser

public float getInitValueUser()
Returns:
the initial transformation value by the user-defined-axis (1.0f is 360 degree)

setInitValue

public void setInitValue(TransformationDirectives.Axes axis,
                         float value)
Sets the initial transformation value by the specified axis. Pass null to set the user-defined value.


setInitValue

public void setInitValue(float value)
Sets the initial transformation value by the user-defined axis.


getInitValue

public float getInitValue(TransformationDirectives.Axes axis)
Returns:
the initial transformation value by the specified axis. Pass null to get the user-defined value.

getInitValue

public float getInitValue()
Returns:
the initial transformation value by the user-defined axis.

setSpeedX

public void setSpeedX(float speed)
Sets the speed by the x-axis (e.g. rotations per second).


getSpeedX

public float getSpeedX()
Returns:
the speed by the x-axis (e.g. rotations per second)

setSpeedY

public void setSpeedY(float speed)
Sets the speed by the y-axis (e.g. rotations per second).


getSpeedY

public float getSpeedY()
Returns:
the speed by the y-axis (e.g. rotations per second)

setSpeedZ

public void setSpeedZ(float speed)
Sets the speed by the z-axis (e.g. rotations per second).


getSpeedZ

public float getSpeedZ()
Returns:
the speed by the z-axis (e.g. rotations per second)

setSpeedUser

public void setSpeedUser(float speed)
Sets the speed by the user-defined-axis (e.g. rotations per second).


getSpeedUser

public float getSpeedUser()
Returns:
the speed by the user-defined-axis (e.g. rotations per second)

setSpeed

public void setSpeed(TransformationDirectives.Axes axis,
                     float value)
Sets the speed by the specified axis. Pass null to get the user-defined axis speed.

Parameters:
axis - the axis to rotate agound
value - the turns per second

setSpeed

public void setSpeed(float value)
Sets the speed by the user-defined axis.

Parameters:
value - the turns per second

getSpeed

public float getSpeed(TransformationDirectives.Axes axis)
Returns the speed by the specified axis. Pass null to get the user-defined axis speed.

Parameters:
axis - the axis to translate by
Returns:
the turns per second

getSpeed

public float getSpeed()
Returns the speed by the user-defined axis.

Returns:
the turns per second