grabNavigator derived from ygCAVENavigator

Description: a navigator that can grab and move with respect to another node

notes:
Category: User
Author: Alex Hill
11/01/01
Revision: 01/15/03 Alex Hill - added report message

    Messages
toggle string toggle the grab/drop state with respect to a node
grab string, [grab | teleport | move] grab a node and move with repect to that node
drop [string] drop connection with a node or any node grabbed
mode [grab | move | teleport] switch modes or reset to grab mode
    Events
grab node
drop node
arrived node
    Comments

constructor grabNavigator

destructor ~grabNavigator

method reset

1 reset node pointer
2 set mode to grab
3 set position distance threshold to 0.1
4 set position motion threshold to 0.5
5 set heading distance threshold to 0.5
6 set heading motion threshold to 5.0

method message

1 toggle the grab/drop state with respect to a node
2 grab a node and move with repect to that node
3 drop connection with a node or any node grabbed
4 switch modes or reset to grab mode

method grab

1 if the node has been found
1.1
Now we calculate the relative matrix between the node and this object.
          We use the following formula to calculate our matrix...
                               -1
          matrix = M      * M
                      self     node
        

1.2 calculate the relative matrix

method drop

1 if a node is being tracked then drop

method app

0.1 if mode is teleport
0.1.1 get node matrix
0.1.2 get node position
0.1.3 get node heading
0.1.4 set new position and heading
0.1.1 get node matrix
0.1.2 get node position
0.1.3 get node heading
0.1.4 get delta position
0.1.5 calculate the new move based on navigation speed
0.1.6 calculate the new heading based on rotation speed
0.1.7 set new position and heading
0.1.1 get node matrix
0.1.2 get new navigation matrix
0.1.3 get new position
0.1.4 get new heading
0.1.5 set new position and heading