com.threerings.tudey.server.logic
Class BehaviorLogic.PathCandidate

java.lang.Object
  extended by com.threerings.tudey.server.logic.BehaviorLogic.PathCandidate
Enclosing class:
BehaviorLogic

protected static class BehaviorLogic.PathCandidate
extends Object

A candidate path under consideration for branching.


Field Summary
protected  int _cidx
          The index of the closest node on the path.
protected  Vector2f[] _path
          The base path.
protected  Logic _target
          The logic with which the path is associated.
 
Constructor Summary
BehaviorLogic.PathCandidate(Logic target, Vector2f[] path, int cidx)
          Creates a new path candidate.
 
Method Summary
 Vector2f[] getRemainingPath(float angle)
          Returns the portion of the path from the closest node to the end, using the supplied angle to determine which direction to travel along the path in cases of ambiguity.
 Logic getTarget()
          Returns a reference to the logic associated with the path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_target

protected Logic _target
The logic with which the path is associated.


_path

protected Vector2f[] _path
The base path.


_cidx

protected int _cidx
The index of the closest node on the path.

Constructor Detail

BehaviorLogic.PathCandidate

public BehaviorLogic.PathCandidate(Logic target,
                                   Vector2f[] path,
                                   int cidx)
Creates a new path candidate.

Method Detail

getTarget

public Logic getTarget()
Returns a reference to the logic associated with the path.


getRemainingPath

public Vector2f[] getRemainingPath(float angle)
Returns the portion of the path from the closest node to the end, using the supplied angle to determine which direction to travel along the path in cases of ambiguity. This clobbers the contained path.