|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.media.util.PathSequence
public class PathSequence
Used to create a path that is a sequence of several other paths.
| Field Summary | |
|---|---|
protected Path |
_curPath
The current path we're pathing. |
protected long |
_lastInit
The timestamp at which we last inited a path. |
protected Pathable |
_pable
The pathable we're duping bigtime. |
protected Pathable |
_pableRep
A fake pathable that we pass to the subpaths. |
protected List<Path> |
_paths
The list of paths. |
| Constructor Summary | |
|---|---|
PathSequence(List<Path> paths)
Construct a path sequence with the list of paths. |
|
PathSequence(Path first,
Path second)
Conveniently construct a path sequence with the two specified paths. |
|
| Method Summary | |
|---|---|
void |
addPath(Path path)
Add a new path to the end of our current list. |
void |
fastForward(long timeDelta)
This is called if the pathable is paused for some length of time and then unpaused. |
void |
init(Pathable pable,
long tickStamp)
Called once to let the path prepare itself for the process of animating the supplied pathable. |
protected void |
initNextPath(long initStamp,
long tickStamp)
Initialize and start the next path in the sequence. |
void |
paint(Graphics2D gfx)
Paint this path on the screen (used for debugging purposes only). |
boolean |
tick(Pathable pable,
long tickStamp)
Called to request that this path update the position of the specified pathable based on the supplied timestamp information. |
void |
wasRemoved(Pathable pable)
When a path is removed from a pathable, whether that is because the path was completed or because it was replaced by another path, this method will be called to let the path know that it is no longer associated with this pathable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected List<Path> _paths
protected long _lastInit
protected Path _curPath
protected Pathable _pable
protected Pathable _pableRep
| Constructor Detail |
|---|
public PathSequence(Path first,
Path second)
public PathSequence(List<Path> paths)
| Method Detail |
|---|
public void addPath(Path path)
public void init(Pathable pable,
long tickStamp)
PathPath.tick(com.threerings.media.util.Pathable, long) after Path.init(com.threerings.media.util.Pathable, long) with the same
initialization timestamp.
init in interface Path
public boolean tick(Pathable pable,
long tickStamp)
Path
tick in interface Pathpable - the pathable whose position should be updated.tickStamp - the timestamp associated with this frame.
public void fastForward(long timeDelta)
Path
fastForward in interface Pathpublic void paint(Graphics2D gfx)
Path
paint in interface Pathpublic void wasRemoved(Pathable pable)
Path
wasRemoved in interface Path
protected void initNextPath(long initStamp,
long tickStamp)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||