[osg-users] TrackballManipulator possible bug; definite issue
allen.saucier at itt.com
Wed Nov 4 09:50:15 PST 2009
I don't know if anyone has delt w/ this problem yet, but it appears that TrackballManipulator has a bug in it in the methods, setByMatrix() and computePosition().
I could be wrong, as I'm a novice in OSG, but I have observed the following:
1. does not work for me as every time I call it, the camera's position & orientation are not altered or updated
2. the code "appears" to be incorrect compared to other manipulator examples which work.
void NodeTrackerManipulator::setByMatrix(const osg::Matrixd& matrix)
this code works. But from TrackballManipulator:
void TrackballManipulator::setByMatrix(const osg::Matrixd& matrix)
_center = osg::Vec3(0.0f,0.0f,-_distance)*matrix;
_rotation = matrix.getRotate();
This code does NOT work.
as for computePosition()
1. in TrackballManipulator, it appears to be using COLUMN MAJOR matrices but OSG is row major.
2. as compared to NodeTracker and Terrain manipulators, the method for computing the position/orientation is consistent. However, in the Trackball it is performed using, I believe, an invalid way to fill a matrix with rotation/orientation information.
Has anyone else encountered this?
Read this topic online here:
More information about the osg-users