org.jagatoo.loaders.models.cal3d.core
Class CalAnimationCycle

java.lang.Object
  extended by org.jagatoo.loaders.models.cal3d.core.CalAnimation
      extended by org.jagatoo.loaders.models.cal3d.core.CalAnimationCycle
Direct Known Subclasses:
CalAnimationRelative

public class CalAnimationCycle
extends CalAnimation

The animation cycle class.


Field Summary
protected  float targetDelay
           
protected  float targetWeight
           
 
Fields inherited from class org.jagatoo.loaders.models.cal3d.core.CalAnimation
coreAnimation, state, STATE_ASYNC, STATE_IN, STATE_NONE, STATE_OUT, STATE_STEADY, STATE_STOPPED, STATE_SYNC, time, timeFactor, type, TYPE_ACTION, TYPE_CYCLE, TYPE_NONE, TYPE_POSE, weight
 
Constructor Summary
CalAnimationCycle(CalCoreAnimation coreAnimation)
          Constructs the animation cycle instance.
 
Method Summary
 void blend(float weight, float delay)
          Interpolates the weight of the animation cycle instance.
 void setAsync()
          Puts the animation cycle into async state starting from animation time 0 with the default duration.
 void setAsync(float time, float duration)
          Puts the animation cycle instance into async state.
 boolean update(float deltaTime)
          Updates the animation cycle instance.
 
Methods inherited from class org.jagatoo.loaders.models.cal3d.core.CalAnimation
freeze, getCoreAnimation, getState, getTime, getTimeFactor, getType, getWeight, setRootDisplacement, setRootRotation, setTimeFactor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

targetDelay

protected float targetDelay

targetWeight

protected float targetWeight
Constructor Detail

CalAnimationCycle

public CalAnimationCycle(CalCoreAnimation coreAnimation)
Constructs the animation cycle instance. This function is the default constructor of the animation cycle instance.

Method Detail

blend

public void blend(float weight,
                  float delay)
Interpolates the weight of the animation cycle instance. This function interpolates the weight of the animation cycle instance to a new value in a given amount of time.

Parameters:
weight - The weight to interpolate the animation cycle instance to.
delay - The time in seconds until the new weight should be reached.

setAsync

public void setAsync(float time,
                     float duration)
Puts the animation cycle instance into async state. This function puts the animation cycle instance into async state, which means that it will end after the current running cycle.

Parameters:
time - The time in seconds at which the animation cycle instance was unlinked from the global mixer animation cycle.
duration - The current duration of the global mixer animation cycle in seconds at the time of the unlinking.

setAsync

public void setAsync()
Puts the animation cycle into async state starting from animation time 0 with the default duration.


update

public boolean update(float deltaTime)
Updates the animation cycle instance. This function updates the animation cycle instance for a given amount of time.

Parameters:
deltaTime - The elapsed time in seconds since the last update.
Returns:
One of the following values:
  • true if the animation cycle instance is still active
  • false if the execution of the animation cycle instance has ended