valuator derived from interpolate Example Source Header

Description: an interpolate node with transformed position and orientation values

notes:
Category: Math
Author: Alex Hill
Revision: 06/01/02

    Messages
toggle string toggle the grab/drop state with respect to a node
grab node grab a node and move with repect to that node
drop [string] drop connection with a node or any node grabbed
position three floats set the translational component
orientation three floats set the orientation component
updateInterval float set the Message update interval for remote users
    Events
grab node
grab node
    Comments

constructor valuator

1 create a simple coordinate network Message
2 dont include in documentation
3 create an unreliable Message for coordinate values

destructor ~valuator

method reset

1 if net master then
1.1 reset matrix to identity
1.2 reset node pointer
1.3 reset grab flag
1.4 set position to (0,0,0)
1.5 set orientation to (0,0,0)
1.6 set matrix to identity
1.7 set update interval to 0.0
1.8 set last update time to 0.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 set the translational component
5 set the orientation component
6 set the Message update interval for remote users

method app

1 if net master

method calculateTransform

1 if the node has been found
1.0.1
calculate the relative matrix between the node and this object
              using the following formula:
                                      -1
              delatMatrix = M      * M
                             self     node
            

1.0.2 Set this instance as "grabbed".
1.1
move this matrix with respect to the node
                                      -1
           M = deltaMatrix * M     * M
                              node    parent
        

1.2 get the node's transformation matrix
1.3 get our object's transformation matrix relative to the world
1.4 set the new transformation and return
1.5 calculate interpolated array values

method updateTransform

1 if update interval has passed then update Message

method getMatrix

method setMatrix

method setPosition

method setOrientation