EDU.gatech.cc.is.clay
Class v_Closest_va

java.lang.Object
  |
  +--EDU.gatech.cc.is.clay.Node
        |
        +--EDU.gatech.cc.is.clay.NodeVec2
              |
              +--EDU.gatech.cc.is.clay.v_Closest_va

public class v_Closest_va
extends NodeVec2

Finds the closest in a list of Vec2s. Assumes the vectors point egocentrically to the objects, so that the closest one has the shortest r value.

For detailed information on how to configure behaviors, see the Clay page.

Copyright (c)1997, 1998 Tucker Balch


Field Summary
static boolean DEBUG
          Turns debugging on or off.
 
Fields inherited from class EDU.gatech.cc.is.clay.Node
DEBUG, embedded_nodes
 
Constructor Summary
v_Closest_va(NodeVec2Array im1)
          Instantiate a v_Closest_va node.
 
Method Summary
 Vec2 Value(long timestamp)
          Return a Vec2 representing the closest object, or 0,0 if none are visible.
 
Methods inherited from class EDU.gatech.cc.is.clay.Node
initTrial
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG
Turns debugging on or off.
Constructor Detail

v_Closest_va

public v_Closest_va(NodeVec2Array im1)
Instantiate a v_Closest_va node.
Parameters:
im1 - NodeVec2, the embedded node that generates a list of items to scan.
Method Detail

Value

public Vec2 Value(long timestamp)
Return a Vec2 representing the closest object, or 0,0 if none are visible.
Overrides:
Value in class NodeVec2
Parameters:
timestamp - long, only get new information if timestamp > than last call or timestamp == -1.
Returns:
the vector.