|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.tudey.util.ActorAdvancer
public class ActorAdvancer
Used on the client and the server to advance the state of an actor based on its state and surroundings.
| Nested Class Summary | |
|---|---|
static interface |
ActorAdvancer.Environment
Provides a callback mechanism to allow the advancer to query the actor's environment while advancing it. |
| Field Summary | |
|---|---|
protected Actor |
_actor
The current actor state. |
protected ActorAdvancer.Environment |
_environment
The actor's environment. |
protected Shape |
_shape
The shape of the actor. |
protected int |
_timestamp
The timestamp at which the state is valid. |
protected Transform2D |
_transform
Used to store the actor's transform. |
| Constructor Summary | |
|---|---|
ActorAdvancer(ActorAdvancer.Environment environment,
Actor actor,
int timestamp)
Creates a new advancer for the supplied actor. |
|
| Method Summary | |
|---|---|
void |
advance(int timestamp)
Advances the actor to the specified timestamp. |
Actor |
getActor()
Returns a reference to the advancer actor. |
int |
getTimestamp()
Returns the advancer timestamp. |
void |
init(Actor actor,
int timestamp)
(Re)initializes the advancer. |
void |
jump(int timestamp)
Jumps to the specified timestamp without actually taking a step. |
protected void |
step(float elapsed)
Takes an Euler step of the specified length. |
void |
transfer(ActorAdvancer source)
Transfers state from the specified source advancer. |
protected void |
updateShape()
Updates the stored shape. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ActorAdvancer.Environment _environment
protected Actor _actor
protected int _timestamp
protected Shape _shape
protected Transform2D _transform
| Constructor Detail |
|---|
public ActorAdvancer(ActorAdvancer.Environment environment,
Actor actor,
int timestamp)
| Method Detail |
|---|
public Actor getActor()
public int getTimestamp()
public void init(Actor actor,
int timestamp)
public void transfer(ActorAdvancer source)
public void advance(int timestamp)
public void jump(int timestamp)
protected void step(float elapsed)
protected void updateShape()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||