|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.scenegraph.SceneGraphObject
org.xith3d.scenegraph.Node
org.xith3d.scenegraph.GroupNode
org.xith3d.scenegraph.Group
org.xith3d.scenegraph.TransformGroup
org.xith3d.schedops.movement.AnimatableGroup
public class AnimatableGroup
This class is useful to automatically animate a branch in your scenegraph.
| Field Summary | |
|---|---|
protected GroupAnimator |
groupAnimator
|
protected static java.util.Random |
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 | |
|---|---|
AnimatableGroup(GroupAnimator groupAnimator)
Creates a new AnimatableGroup. |
|
| Method Summary | |
|---|---|
boolean |
animate(long gameTime,
long frameTime,
UpdatingThread.TimingMode timingMode)
Calculates positions and rotation of contained objects to render them at their new placement, if the animation has been started. |
GroupAnimator |
getGroupAnimator()
|
TransformationDirectives |
getTransformationDirectives()
|
boolean |
isAlive()
if false, the object will be removed from the scheduler next loop iteration |
boolean |
isAnimating()
|
boolean |
isPersistent()
If this operation is persistent, it remains scheduled after beeing executed once. |
void |
setAlive(boolean alive)
Sets this Object alive or dead |
void |
setScale(float factor)
Sets this group's scale to the specified factor. |
void |
setTransformationDirectives(TransformationDirectives tfDirecs)
Changes the TransformationDirectives used by this AnimatableGroup. |
void |
setTranslation(float transX,
float transY,
float transZ)
Moves this Group by the specified vector-components. |
void |
setTranslation(org.openmali.vecmath2.Vector3f translation)
Moves this Group by the specified vector. |
void |
startAnimation(long gameTime,
UpdatingThread.TimingMode timingMode)
Starts the animation of this object. |
void |
stopAnimation()
Stops the animation of this object. |
void |
update(long gameTime,
long frameTime,
UpdatingThread.TimingMode timingMode)
Updates this Updatable object. |
| 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.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 |
| Field Detail |
|---|
protected static final java.util.Random RND
protected final GroupAnimator groupAnimator
| Constructor Detail |
|---|
public AnimatableGroup(GroupAnimator groupAnimator)
groupAnimator - the GroupAnimator used to animate this group| Method Detail |
|---|
public GroupAnimator getGroupAnimator()
public TransformationDirectives getTransformationDirectives()
public void setTransformationDirectives(TransformationDirectives tfDirecs)
tfDirecs - the new TransformationDirectivespublic boolean isAnimating()
isAnimating in interface Animatable
public void startAnimation(long gameTime,
UpdatingThread.TimingMode timingMode)
startAnimation in interface Animatablepublic void stopAnimation()
stopAnimation in interface Animatablepublic boolean isPersistent()
isPersistent in interface ScheduledOperation
public boolean animate(long gameTime,
long frameTime,
UpdatingThread.TimingMode timingMode)
gameTime - the amount of milliseconds since the game startedframeTime - miliseconds needed to render one frame
public void update(long gameTime,
long frameTime,
UpdatingThread.TimingMode timingMode)
update in interface UpdatablegameTime - the gameTime in MillisecondsframeTime - the frameTime in Milliseconds (needed time for the last frame)timingMode - the TimingMode to use for frameTime.public void setAlive(boolean alive)
setAlive in interface ScheduledOperationalive - if false, the object will be removed from the scheduler next loop iterationpublic boolean isAlive()
isAlive in interface ScheduledOperation
public void setTranslation(float transX,
float transY,
float transZ)
transX - the x-amount to move bytransY - the y-amount to move bytransZ - the z-amount to move bypublic void setTranslation(org.openmali.vecmath2.Vector3f translation)
translation - the amount to move bypublic void setScale(float factor)
factor - the factor to scale to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||