com.threerings.tudey.util
Class MobileAdvancer

java.lang.Object
  extended by com.threerings.tudey.util.ActorAdvancer
      extended by com.threerings.tudey.util.MobileAdvancer
Direct Known Subclasses:
ActiveAdvancer

public class MobileAdvancer
extends ActorAdvancer

Advancer for mobile actors.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.tudey.util.ActorAdvancer
ActorAdvancer.Environment
 
Field Summary
protected  Mobile _mobile
          A casted reference to the mobile.
protected  Vector2f _otrans
          Used to store the mobile's original translation.
protected  Vector2f _penetration
          Stores the penetration vector.
protected static float MAX_SUBSTEP
          The length, in seconds, of the longest substep we're willing to take.
 
Fields inherited from class com.threerings.tudey.util.ActorAdvancer
_actor, _environment, _shape, _timestamp, _transform
 
Constructor Summary
MobileAdvancer(ActorAdvancer.Environment environment, Mobile mobile, int timestamp)
          Creates a new advancer for the supplied mobile.
 
Method Summary
 void init(Actor actor, int timestamp)
          (Re)initializes the advancer.
protected  void mobileStep(float elapsed, int timestamp)
          Executes a step on the mobile.
protected  void step(float elapsed)
          Takes an Euler step of the specified length.
protected  void substep(float elapsed, int timestamp)
          Executes a substep of the specified duration.
protected  void takeSubsteps(float elapsed)
          Executes the substeps required for the current step.
 
Methods inherited from class com.threerings.tudey.util.ActorAdvancer
advance, getActor, getTimestamp, jump, transfer, updateShape
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_mobile

protected Mobile _mobile
A casted reference to the mobile.


_penetration

protected Vector2f _penetration
Stores the penetration vector.


_otrans

protected Vector2f _otrans
Used to store the mobile's original translation.


MAX_SUBSTEP

protected static final float MAX_SUBSTEP
The length, in seconds, of the longest substep we're willing to take.

See Also:
Constant Field Values
Constructor Detail

MobileAdvancer

public MobileAdvancer(ActorAdvancer.Environment environment,
                      Mobile mobile,
                      int timestamp)
Creates a new advancer for the supplied mobile.

Method Detail

init

public void init(Actor actor,
                 int timestamp)
Description copied from class: ActorAdvancer
(Re)initializes the advancer.

Overrides:
init in class ActorAdvancer

step

protected void step(float elapsed)
Description copied from class: ActorAdvancer
Takes an Euler step of the specified length.

Overrides:
step in class ActorAdvancer

takeSubsteps

protected void takeSubsteps(float elapsed)
Executes the substeps required for the current step.


substep

protected void substep(float elapsed,
                       int timestamp)
Executes a substep of the specified duration.

Parameters:
timestamp - the timestamp at the end of the substep.

mobileStep

protected void mobileStep(float elapsed,
                          int timestamp)
Executes a step on the mobile.