manipulator derived from ygTransform | Example | Source | Header |
Messages |
node | node | set the node to manipulate |
mode | [position | orientation | size | sizeall | grab] | set mode |
axis | [auto | x | y | z | xy | yz | xz | xyz] | set axis |
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 |
Events |
grab | ||
drop |
Comments |
constructor manipulator
destructor ~manipulator
method reset
1 reset last matrix to identity
2 reset node pointer
3 reset grab pointer
4 reset mode
5 reset axis
6 create parent transform if necessary
7 reset parent transform
method message
1 set the node to manipulate
2 set mode
3 set axis
4 toggle the grab/drop state with respect to a node
5 grab a node and move with repect to that node
6 drop connection with a node or any node grabbed
method grab
1 block attempts to manipulate the world
2 if the node has been found
2.1 Calculate the relative translation to the grab node
2.2 get handle matrix
2.3 get inverse of handle matrix
2.4 get current transformation
2.5 calculate difference between handle and current
method drop
1 if a node is being tracked then drop
method app
0.0.0.1 set the rotation axis
0.0.0.2 get node position vector relative to this node
0.0.0.3 get the cross product of the node vector and the rotation axis
0.0.0.4 establish the object front as the handle vector
0.0.0.5 get the cross product of the front axis and the rotation axis
0.0.0.6 get a normal towards the node by crossing this cross with the rotation axis
0.0.0.7 get the rotation to the node vector
0.0.0.8 create a matrix with this rotation
0.0.0.9 get the rotation about the node cross product
0.0.0.10 add this rotation matrix to the existing matrix
0.0.0.11 add the translation component
0.0.1 get handle matrix
0.0.2 get parent transformation
0.0.3 invert parent transform
0.0.4 Set the new transformation and return
0.1 set the dcs matrix