com.threerings.tudey.util
Class ActorHistory.Entry

java.lang.Object
  extended by com.threerings.tudey.util.ActorHistory.Entry
Enclosing class:
ActorHistory

protected static class ActorHistory.Entry
extends Object

A single historical entry.


Field Summary
protected  Actor _actor
          The actor state.
protected  int _timestamp
          The timestamp of this entry.
 
Constructor Summary
ActorHistory.Entry(int timestamp, Actor actor)
          Creates a new entry.
 
Method Summary
 Actor extrapolate(int timestamp, Actor result)
          Extrapolates from this entry to the specified timestamp.
 Actor getActor()
          Returns a reference to the actor state.
 float getPortion(ActorHistory.Entry other, int timestamp)
          Returns the portion of time elapsed between this and the specified other entry.
 int getTimestamp()
          Returns the timestamp of the entry.
 Actor interpolate(ActorHistory.Entry other, int timestamp, Actor result)
          Interpolates between this entry and another.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_timestamp

protected int _timestamp
The timestamp of this entry.


_actor

protected Actor _actor
The actor state.

Constructor Detail

ActorHistory.Entry

public ActorHistory.Entry(int timestamp,
                          Actor actor)
Creates a new entry.

Method Detail

getTimestamp

public int getTimestamp()
Returns the timestamp of the entry.


getActor

public Actor getActor()
Returns a reference to the actor state.


extrapolate

public Actor extrapolate(int timestamp,
                         Actor result)
Extrapolates from this entry to the specified timestamp.


interpolate

public Actor interpolate(ActorHistory.Entry other,
                         int timestamp,
                         Actor result)
Interpolates between this entry and another.


getPortion

public float getPortion(ActorHistory.Entry other,
                        int timestamp)
Returns the portion of time elapsed between this and the specified other entry.