pointAtTrigger derived from ygNode Example Source Header

Description: detects a wand pointing at any geometry below it and produces an event

notes:
Category: Trigger
Author: Dave Pape
Revision: 11/01/01

    Messages
distance float set the intersection distance from the wand
intersect [all | wall | floor | grab | debug | off] set the intersection class to detect
local [bool] set position reporting mode
    Events
start wand, user, node a wand and associated user have begun pointing
pointing wand, user, node, xpos, ypos, zpos a user is pointing at the geometry
event wand, user, node, xpos, ypos, zpos any wand events are generated while in the space
stop wand, user a wand and associated user have stopped pointing
    Debugs
pointing
    Comments

constructor pointAtTrigger

destructor ~pointAtTrigger

method reset

1 set reporting mode to local
2 set distance to 10.0
3 set intersect class to "all"
4 for each user in the world
4.1 for each associated wand
4.1.0.1 for each wand event
4.1.0.1.1 if not found then add event

method message

1 set the intersection distance from the wand
2 set the intersection class to detect
3 set position reporting mode

method app

1 for all users in the world
1.1 for each user wand
1.1.0.1 if the wand is pointing at geometry
1.1.0.1.1 if not previously pointing generate start event
1.1.0.1.1.1 a wand and associated user have begun pointing
1.1.0.1.2 a user is pointing at the geometry
1.1.0.1.3 if the number of wand flags is positive
1.1.0.1.3.1 for each wand flag
1.1.0.1.3.1.1 any wand events are generated while in the space
2 for each wand previously pointing at geometry
2.1 if not currently pointing then generate stop event
3 a wand and associated user have stopped pointing

method pointingAtMe