com.threerings.tudey.util
Class ActiveAdvancer

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

public class ActiveAdvancer
extends MobileAdvancer

Advancer for active actors.


Nested Class Summary
protected  class ActiveAdvancer.Activity
          The mapping for an activity.
 
Nested classes/interfaces inherited from class com.threerings.tudey.util.ActorAdvancer
ActorAdvancer.Environment
 
Field Summary
protected  Active _active
          A casted reference to the active.
protected  IntMap<ActiveAdvancer.Activity> _activities
          The mappings for the various activities.
 
Fields inherited from class com.threerings.tudey.util.MobileAdvancer
_mobile, _otrans, _penetration, MAX_SUBSTEP
 
Fields inherited from class com.threerings.tudey.util.ActorAdvancer
_actor, _environment, _shape, _timestamp, _transform
 
Constructor Summary
ActiveAdvancer(ActorAdvancer.Environment environment, Active active, int timestamp)
          Creates a new advancer for the supplied active.
 
Method Summary
 boolean canMove()
          Determines whether the actor can move.
 boolean canRotate()
          Determines whether the actor can rotate.
protected  ActiveAdvancer.Activity getActivity()
          Returns a reference to the mapping for the current activity, or null for none.
 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.
 
Methods inherited from class com.threerings.tudey.util.MobileAdvancer
substep, takeSubsteps
 
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

_active

protected Active _active
A casted reference to the active.


_activities

protected IntMap<ActiveAdvancer.Activity> _activities
The mappings for the various activities.

Constructor Detail

ActiveAdvancer

public ActiveAdvancer(ActorAdvancer.Environment environment,
                      Active active,
                      int timestamp)
Creates a new advancer for the supplied active.

Method Detail

canMove

public boolean canMove()
Determines whether the actor can move.


canRotate

public boolean canRotate()
Determines whether the actor can rotate.


init

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

Overrides:
init in class MobileAdvancer

step

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

Overrides:
step in class MobileAdvancer

mobileStep

protected void mobileStep(float elapsed,
                          int timestamp)
Description copied from class: MobileAdvancer
Executes a step on the mobile.

Overrides:
mobileStep in class MobileAdvancer

getActivity

protected ActiveAdvancer.Activity getActivity()
Returns a reference to the mapping for the current activity, or null for none.