Hi all,

when I select the NodeTrackerManipulator using the keyswitchmanipulator more 
then one time, the view position changes every time.

The problem I'm speaking about can be seen running the osgsimulation example 
(I'm running the osg trunk examples, but I guess it's always been there: the 
same was happening with the 2.8.3 too):
the NodeTrackerManipulator can be chosen pushing the 0 (zero) key: try pressing 
it more times, or simply switch from the TrackBallManipulator to 
NodeTrackerManipulator (1 key and 0 key):
- when selecting the TrackBallManipulator the cessna starts moving from the 
same view in which it was left by the NodeTrackerManipulator (correct behavior)
- when selecting the NodeTrackerManipulator it changes view position at every 
manipulator switch.

I've looked in the forum about such a problem, but could not find anything :(

I've looked into the code, and it seems related to how the getMatrix(), 
setByMatrix and getInverseMatrix are implemented in the NodeTrackerManipulator: 
- in the getMatrix() it uses nodecenter, noderotation, _rotation and _distance 
to calculate the matrix
- then in the setByMatrix method it sets the _rotation quaternion using this 
matrix
- finally in the getInverseMatrix method it uses again all nodecenter, 
noderotation, _rotation and _distance to calculate the return matrix. 

So it seems that nodecenter and noderotation are used twice, and this maybe 
could explain the change in the view at every keyswitchmanipulator call.

Any ideas?

Thank you!

Regards,
Anna

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=32017#32017





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to