|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.schedops.movement.GroupAnimator
public abstract class GroupAnimator
This class is useful to automatically animate a branch in your scenegraph.
| Field Summary | |
|---|---|
protected static java.util.Random |
rnd
|
protected Transform3D |
t3dMain
|
protected java.util.ArrayList<Transformable> |
transformNodes
|
| Constructor Summary | |
|---|---|
GroupAnimator(Transformable tn,
TransformationDirectives tfDirecs)
Creates a new GroupAnimator. |
|
GroupAnimator(TransformationDirectives tfDirecs)
Creates a new GroupAnimator. |
|
| Method Summary | |
|---|---|
void |
addTransformNode(Transformable tn)
Sets the TransformGroup to animate. |
abstract 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. |
int |
getNumTransformNodes()
|
TransformationDirectives |
getTransformationDirectives()
|
Transformable |
getTransformNode()
|
Transformable |
getTransformNode(int index)
|
boolean |
isAlive()
If false, the object will be removed from the scheduler next loop iteration. |
boolean |
isAnimating()
|
boolean |
isPersistent()
This operation IS persistent. |
void |
setAlive(boolean alive)
Sets this Object alive or dead. |
void |
setScale(float factor)
Sets this group's scale to the specified factor. |
void |
setTransform(Transform3D transform)
This method could be implemented otherwise if the super method wasn't final. |
void |
setTransformationDirectives(TransformationDirectives tfDirecs)
Changes the TransformationDirectives used by this AnimatableGroup. |
void |
setTransformNode(int index,
Transformable tn)
Sets the TransformGroup to animate. |
void |
setTransformNode(Transformable tn)
Sets the TransformGroup to animate. |
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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final java.util.ArrayList<Transformable> transformNodes
protected Transform3D t3dMain
protected static java.util.Random rnd
| Constructor Detail |
|---|
public GroupAnimator(TransformationDirectives tfDirecs)
tfDirecs - the new TransformationDirectives
public GroupAnimator(Transformable tn,
TransformationDirectives tfDirecs)
tn - the TransformNode to animatetfDirecs - the new TransformationDirectives| Method Detail |
|---|
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 Animatable
public abstract boolean animate(long gameTime,
long frameTime,
UpdatingThread.TimingMode timingMode)
gameTime - the amount of milliseconds since the game startedframeTime - miliseconds needed to render one frametimingMode -
public final void update(long gameTime,
long frameTime,
UpdatingThread.TimingMode timingMode)
Updatable
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 final boolean isPersistent()
isPersistent in interface ScheduledOperationpublic final void setAlive(boolean alive)
setAlive in interface ScheduledOperationalive - if false, the object will be removed from the scheduler next loop iterationpublic final boolean isAlive()
isAlive in interface ScheduledOperationpublic final void setTransform(Transform3D transform)
public final 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 final void setTranslation(org.openmali.vecmath2.Vector3f translation)
translation - the amount to move bypublic final void setScale(float factor)
factor - the factor to scale topublic final int getNumTransformNodes()
Transformables, this GroupAnimator influences.public final void addTransformNode(Transformable tn)
tn - the TransformNode to animate
public final void setTransformNode(int index,
Transformable tn)
index - tn - the TransformNode to animatepublic final void setTransformNode(Transformable tn)
tn - the TransformNode to animatepublic final Transformable getTransformNode(int index)
index -
public final Transformable getTransformNode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||