nodeTrigger derived from ygSpace | Example | Source | Header |
Messages |
detect | class | set the type of node to detect |
local | [bool] | set position reporting mode |
Events |
enter | node | the node has entered the space |
inside | node, xpos, ypos, zpos | a node is inside the space |
exit | node | the node has exited the space |
Debugs |
inside |
Comments |
constructor nodeTrigger
destructor ~nodeTrigger
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 space2 for each node previously inside
1.1.1 add to set of nodes inside
1.1.2 if inside but not previously then generate enter event
1.1.2.1 the node has entered the space1.1.3 a node is inside the space
2.1 if not currently inside then generate exit event3 the node has exited the space