| I am currently developping an OSG application running on Fedora Core 3 and Core 5. I brought the code at home to test it on my Mac Book Pro under MacOSX. I had to modify the Makefile to get everything to build, and now it's working. I can already report some minor differences with the 1.0 Unix build of OSG : -My application have some keyboard events which are working under Fedora : -'t' key is displaying text information under each entity -'v' key is switching the node tracked by the camera The 't' key is working well, but when I hit the 'v' key the view is getting crazy. This is the function called when I hit that key, it changes my viewer's tracker : void setTracker(Entite* _e) { //m_tm->setTrackerMode( osgGA::NodeTrackerManipulator::NODE_CENTER); m_tm->setRotationMode( osgGA::NodeTrackerManipulator::ELEVATION_AZIM ); m_tm->setTrackNode(_e->getNode()); // osg::Matrixd cam_matrixd=m_tm->getMatrix(); // osg::Matrixd rotation(0.0, 1.0, 0.0, cam_matrixd(0,3), // -1.0, 0.0, 0.0, cam_matrixd(1,3), // 0.0,0.0,0.0, cam_matrixd(2,3), // cam_matrixd(3,0), cam_matrixd(3,1),cam_matrixd(3,2), cam_matrixd(3,3)); // m_tm->setByMatrix(rotation); osg::Matrixd cam_matrixd(_e->getPAT()->getAttitude()); m_tm->setByMatrix(cam_matrixd); unsigned int num = addCameraManipulator(m_tm); selectCameraManipulator( num ); } I call this function at init, and it works, but as soon as I hit the key to change the entity's been tracked it's a scramble.. I made some tests and the event handler is ok. I could even initialize my viewer on another entity and it's ok. The shit happens only when I call this function the second time and so on... I'll try to find how to fix that and why it is different under macosx than fedora, but if you have any idea please feel free to share, David |
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
