[osg-users] Matrix Manipulators and set coordinate frame callback. Different behavior in 2.4?
Dorosky, Christopher G
christopher.g.dorosky at lmco.com
Mon Jul 28 08:19:00 PDT 2008
Hello all,
Under OSG 1.2, I controlled the orientation of an osgGA manipulator
through the use of a coordinate frame callback.
Under 2.4, I am using the same exact code, but the callback never
happens.
Here is the code snippet. Viewer is osgProducer (yes, still).
This loop runs 4 times.
Viewer->getKeySwitchMatrixManipulator()->setHomePosition(eyeECEF,
centerECEF, upECEF, false);
cECEFFrameCB *cb = new cECEFFrameCB;
for(unsigned int i = 0; i<
Viewer->getKeySwitchMatrixManipulator()->getNumMatrixManipulators();
i++)
{
osgGA::MatrixManipulator *mm =
Viewer->getKeySwitchMatrixManipulator()->getMatrixManipulatorWithIndex(i
);
if(mm)
{
mm->setCoordinateFrameCallback(cb);
mm->setHomePosition(eyeECEF, centerECEF, upECEF,
false);
}
}
Where the ECEFFrameCB is derived from the
osgGA:MatrixManipulator::CoordinateFrameCallback.
I put a print in there, and it is never called.
Has this functionality been disabled?
What I am trying to do is set the up, side, and front vectors so that
the manipulator behaves better.
Thanks,
Chris
More information about the osg-users
mailing list