com.threerings.tudey.util
Class ActorHistory

java.lang.Object
  extended by com.threerings.tudey.util.ActorHistory

public class ActorHistory
extends Object

Records a sequence of actor states and allows finding the interpolated historical state.


Constructor Summary
ActorHistory(int timestamp, Actor actor, int duration)
          Creates a new history with the provided initial time and state.
 
Method Summary
 Actor get(int timestamp, Actor result)
          Finds the state at the specified timestamp and places it into the result object.
 void init(int timestamp, Actor actor)
          (Re)initializes the history.
 boolean isCreated(int timestamp)
          Determines whether the actor has yet been created at the specified timestamp.
 boolean isDestroyed(int timestamp)
          Determines whether the actor has been destroyed at the specified timestamp.
 void record(int timestamp, Actor actor)
          Records a state in the stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActorHistory

public ActorHistory(int timestamp,
                    Actor actor,
                    int duration)
Creates a new history with the provided initial time and state.

Method Detail

init

public void init(int timestamp,
                 Actor actor)
(Re)initializes the history.


record

public void record(int timestamp,
                   Actor actor)
Records a state in the stream.


isCreated

public boolean isCreated(int timestamp)
Determines whether the actor has yet been created at the specified timestamp.


isDestroyed

public boolean isDestroyed(int timestamp)
Determines whether the actor has been destroyed at the specified timestamp.


get

public Actor get(int timestamp,
                 Actor result)
Finds the state at the specified timestamp and places it into the result object.



Copyright © 2011. All Rights Reserved.