distance derived from interpolate Example Source Header

Description: a node that generates the distance to a node

notes:
Category: Math
Author: Alex Hill
Revision: 11/01/01

    Messages
node node, (none | head | body | wand), [integer] clear or set the node and optional user body part
bounding [bool] set the bounding sphere reporting mode
    Comments

constructor distance_

destructor ~distance_

method reset

1 clear node name

method message

1 clear or set the node and optional user body part
1.1 if number of arguments is greater than zero
1.1.1 if node type is user then
1.1.1.1 if second argument is "head"
1.1.1.1.1 set node to user head
1.1.1.2 if second argument is "body"
1.1.1.2.1 for each user child
1.1.1.2.1.1 if child is of type body then set node
1.1.1.3 if second argument is "wand"
1.1.1.3.1 if user has a wand then
1.1.1.3.1.1 use specified wand number
1.2 else, clear the node name
2 set the bounding sphere reporting mode

method app

1 if node is set
1.1 calculate user distance
1.2 calculate interpolated array values