org.xith3d.schedops.movement
Class TranslatableGroup

java.lang.Object
  extended by org.xith3d.scenegraph.SceneGraphObject
      extended by org.xith3d.scenegraph.Node
          extended by org.xith3d.scenegraph.GroupNode
              extended by org.xith3d.scenegraph.Group
                  extended by org.xith3d.scenegraph.TransformGroup
                      extended by org.xith3d.schedops.movement.AnimatableGroup
                          extended by org.xith3d.schedops.movement.TranslatableGroup
All Implemented Interfaces:
org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.spatial.SpatialNode, Animatable, ScheduledOperation, Updatable, Transformable

public class TranslatableGroup
extends AnimatableGroup

This class is useful to automatically translate a branch in your scenegraph.


Field Summary
 
Fields inherited from class org.xith3d.schedops.movement.AnimatableGroup
groupAnimator, RND
 
Fields inherited from class org.xith3d.scenegraph.GroupNode
children, hostGroup, numChildren, totalNumChildren, totalNumShapes
 
Fields inherited from class org.xith3d.scenegraph.Node
bounds, boundsAutoCompute, boundsDirty, globalIgnoreBounds, instanceBoundsTypeHint, parent, transformGroup, untransformedBounds
 
Fields inherited from class org.xith3d.scenegraph.SceneGraphObject
XITH3D_USERDATAKEY_OLDUSERDATA
 
Constructor Summary
TranslatableGroup()
          Creates a new TranslatableGroup with default TransformationDirectives in use.
TranslatableGroup(TransformationDirectives transDirecs)
          Creates a new TranslatableGroup with the given TransformationDirectives in use.
 
Method Summary
protected  DistanceInterpolater getDistanceInterpolater(TransformationDirectives.Axes axis)
           
protected  float getTranslationValue(TransformationDirectives.Axes axis, long gameMicros)
           
 
Methods inherited from class org.xith3d.schedops.movement.AnimatableGroup
animate, getGroupAnimator, getTransformationDirectives, isAlive, isAnimating, isPersistent, setAlive, setScale, setTransformationDirectives, setTranslation, setTranslation, startAnimation, stopAnimation, update
 
Methods inherited from class org.xith3d.scenegraph.TransformGroup
getLocalTransform, getLocalTransform, getPosition, getPosition, getTransform, getTransform, getWorldTransform, newInstance, onTransformChanged, setLocalTransform, setPosition, setPosition, setTransform, traverse, updateTransform
 
Methods inherited from class org.xith3d.scenegraph.Group
moveTo
 
Methods inherited from class org.xith3d.scenegraph.GroupNode
absorbDetails, addChild, addChild, checkChild, dump, dump, ensureCapacity, expandBounds, findAll, findAll, findFirst, findFirst, freeOpenGLResources, getChild, getChildren, getChildren, getClipper, getPickHost, getScissorRect, getTotalNumChildren, getTotalNumShapes, indexOf, isPickHost, mergeInheritedClipper, mergeInheritedNodes, mergeInheritedScissorRect, numChildren, removeAllChildren, removeChild, removeChild, setBoundsDirty, setBoundsDirtyUpward, setChild, setClipper, setPickHost, setPickHost, setScissorRect, setShowBounds, sharedCopy, sharedCopy, traverse, unmergeInheritedFog, unmergeInheritedLight, unmergeInheritedNodes, updateBounds, updateBoundsCheap
 
Methods inherited from class org.xith3d.scenegraph.Node
cloneNode, detach, duplicateNode, freeOpenGLResources, getBounds, getBoundsAutoCompute, getBoundsType, getBoundsTypeHint, getDefaultPickable, getIndentString, getInheritedNodeAttributes, getModListener, getOrderedChild, getOrderedState, getParent, getRoot, getShadowAttachment, getShowBounds, getTransformGroup, getTreeCell, getWorldBounds, getWorldTransform, isBillboard, isIgnoreBounds, isOccluder, isPickable, isRenderable, isUpdatableNode, popGlobalIgnoreBounds, printBounds, pushGlobalIgnoreBounds, setBounds, setBoundsAutoCompute, setBoundsTypeHint, setDefaultPickable, setGlobalIgnoreBounds, setIgnoreBounds, setIsOccluder, setModListener, setOrderedChild, setParent, setPickable, setPickableRecursive, setPickableRecursive, setRenderable, setShadowAttachment, setShowBounds, setTransformGroup, setTreeCell, updateOrderedChild, updateTransformGroup, updateWorldTransform
 
Methods inherited from class org.xith3d.scenegraph.SceneGraphObject
getName, getUserData, getUserData, getUserDataMap, isLive, setLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xith3d.scenegraph.Transformable
getName, setName
 

Constructor Detail

TranslatableGroup

public TranslatableGroup(TransformationDirectives transDirecs)
Creates a new TranslatableGroup with the given TransformationDirectives in use.

Parameters:
transDirecs - the new TransformationDirectives

TranslatableGroup

public TranslatableGroup()
Creates a new TranslatableGroup with default TransformationDirectives in use.

Method Detail

getDistanceInterpolater

protected DistanceInterpolater getDistanceInterpolater(TransformationDirectives.Axes axis)
Parameters:
axis - the axis to get the AngleInterpolater for
Returns:
a reference to this group's AngleInterpolater object

getTranslationValue

protected float getTranslationValue(TransformationDirectives.Axes axis,
                                    long gameMicros)
Parameters:
axis - the axis to get the AngleInterpolater for
gameMicros - the time to get the value at
Returns:
the current translation value [0; 2*pi] of the specified axis