|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jagatoo.loaders.models.cal3d.core.CalMixer
public class CalMixer
The mixer handles two tasks: scheduling and blending. Scheduling refers to everything related to time such as when an animation must run or when it must stop. Blending defines how concurrent animations influence each other: for instance walking and waving.
| Field Summary | |
|---|---|
java.util.List<CalAnimationRelative> |
additiveAnimationCycles
|
protected float |
animationDuration
|
protected float |
animationTime
|
java.util.List<CalAnimationAction> |
listAnimationAction
|
java.util.List<CalAnimationCycle> |
listAnimationCycle
|
java.util.Map<java.lang.String,CalAnimation> |
mapAnimation
|
CalModel |
model
|
float |
timeFactor
|
| Constructor Summary | |
|---|---|
CalMixer(CalModel model)
Constructs the mixer instance. |
|
| Method Summary | |
|---|---|
CalAnimation |
applyAdditiveCycle(java.lang.String id,
float time)
Applies an additive animation cycle to the skeleton. |
CalAnimation |
applyAdditiveCycle(java.lang.String id,
java.lang.String baseId,
float time)
Applies an additive animation cycle to the skeleton. |
CalAnimationCycle |
blendCycle(java.lang.String id,
float weight,
float delay)
Blends an animation cycle in. |
void |
clearAction(java.lang.String id)
Clears an active animation action. |
void |
clearAdditiveCycle(java.lang.String id)
|
void |
clearAllAnims()
An abrupt way to clear all animations - actions or cycles. |
void |
clearCycle(java.lang.String id,
float delay)
Fades an animation cycle out. |
CalAnimationAction |
executeAction(java.lang.String id,
float delayIn,
float delayOut)
Executes an animation action. |
CalAnimationAction |
executeAction(java.lang.String id,
float delayIn,
float delayOut,
float weightTarget,
boolean autoLock)
Executes an animation action. |
CalAnimation |
scrubToPosition(java.lang.String id,
float position)
Scrubs an animation cycle to a position (fraction through animation). |
CalAnimation |
scrubToPosition(java.lang.String id,
float position,
float weight)
Scrubs an animation cycle to a position (fraction through animation). |
CalAnimation |
scrubToTime(java.lang.String id,
float time)
Scrubs an animation cycle to a specific time. |
CalAnimation |
scrubToTime(java.lang.String id,
float time,
float weight)
Scrubs an animation cycle to a specific time. |
void |
updateAnimation(float deltaTime)
Updates all active animations. |
void |
updateSkeleton()
Updates the skeleton of the corresponding CalModel to match the current animation state (as updated by the last call to updateAnimation). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public CalModel model
public java.util.Map<java.lang.String,CalAnimation> mapAnimation
public java.util.List<CalAnimationAction> listAnimationAction
public java.util.List<CalAnimationCycle> listAnimationCycle
public java.util.List<CalAnimationRelative> additiveAnimationCycles
protected float animationTime
protected float animationDuration
public float timeFactor
| Constructor Detail |
|---|
public CalMixer(CalModel model)
model - the model that should be managed with this mixer instance.| Method Detail |
|---|
public CalAnimationCycle blendCycle(java.lang.String id,
float weight,
float delay)
id - The ID of the animation cycle that should be blended.weight - The weight to interpolate the animation cycle to.delay - The time in seconds until the new weight should be reached.
public CalAnimation scrubToPosition(java.lang.String id,
float position)
public CalAnimation scrubToPosition(java.lang.String id,
float position,
float weight)
public CalAnimation scrubToTime(java.lang.String id,
float time)
public CalAnimation scrubToTime(java.lang.String id,
float time,
float weight)
public CalAnimation applyAdditiveCycle(java.lang.String id,
float time)
public CalAnimation applyAdditiveCycle(java.lang.String id,
java.lang.String baseId,
float time)
public void clearCycle(java.lang.String id,
float delay)
id - The ID of the animation cycle that should be faded out.delay - The time in seconds until the the animation cycle is
completely removed.public void clearAdditiveCycle(java.lang.String id)
public void clearAllAnims()
public CalAnimationAction executeAction(java.lang.String id,
float delayIn,
float delayOut)
id - The ID of the animation cycle that should be blended.delayIn - The time in seconds until the animation action reaches the
full weight from the beginning of its execution.delayOut - The time in seconds in which the animation action reaches
zero weight at the end of its execution.
public CalAnimationAction executeAction(java.lang.String id,
float delayIn,
float delayOut,
float weightTarget,
boolean autoLock)
id - The ID of the animation cycle that should be blended.delayIn - The time in seconds until the animation action reaches the
full weight from the beginning of its execution.delayOut - The time in seconds in which the animation action reaches
zero weight at the end of its execution.weightTarget - The weight to interpolate the animation action to.autoLock - This prevents the Action from being reset and removedpublic void clearAction(java.lang.String id)
id - The ID of the animation action that should be removed.public void updateAnimation(float deltaTime)
deltaTime - The elapsed time in seconds since the last call.public void updateSkeleton()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||