org.xith3d.schedops.movement
Class RotatableGroup

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.RotatableGroup
All Implemented Interfaces:
org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.spatial.SpatialNode, Animatable, ScheduledOperation, Updatable, Transformable

public class RotatableGroup
extends AnimatableGroup

This class is useful to automatically rotate 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, transformGroup, untransformedBounds
 
Fields inherited from class org.xith3d.scenegraph.SceneGraphObject
XITH3D_USERDATAKEY_OLDUSERDATA
 
Constructor Summary
RotatableGroup()
          Creates a new RotatableGroup with default TransformationDirectives in use.
RotatableGroup(TransformationDirectives rotDirecs)
          Creates a new RotatableGroup with the given TransformationDirectives in use.
 
Method Summary
protected  AngleInterpolater getAngleInterpolater(TransformationDirectives.Axes axis)
           
protected  float getRotationValue(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, setLive, 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, 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

RotatableGroup

public RotatableGroup(TransformationDirectives rotDirecs)
Creates a new RotatableGroup with the given TransformationDirectives in use.

Parameters:
rotDirecs - the new TransformationDirectives

RotatableGroup

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

Method Detail

getAngleInterpolater

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

getRotationValue

protected float getRotationValue(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 rotation value [0; 2*pi] of the specified axis