nodePosition derived from ygSpace

Description: a space that generates position events in the presence of a node type

notes:
Category: Trigger
Author: Dave Pape
11/01/01
Revision: 09/01/04 Alex Hill - changed to detect by actual class name instead of alias used to create the node

    Messages
detect class set the type of node to detect
local [bool] set position reporting mode
    Events
inside node, xpos, ypos, zpos a node is inside the space
enter node, xpos, ypos, zpos the node has entered the space
exit node the node has exited the space
    Debugs
inside
    Comments

constructor nodePosition

destructor ~nodePosition

method reset

1 clear set of nodes previously inside
2 set reporting mode to local

method message

1 set the type of node to detect
2 set position reporting mode

method setDetectType

method app

1 for each node of detect type in the world
1.1 if node is within the space
1.1.1 add to set of nodes inside
1.1.2 a node is inside the space
1.1.3 if inside but not previously then generate enter event
1.1.3.1 the node has entered the space
2 for each node previously inside
2.1 if not currently inside then generate exit event
3 the node has exited the space