Hello, i'm trying to understand how ABSOLUTE_RF works, and i've made a small example. The problem is that it should works but it actually doesn't...
In the following lines : osg::Group * group = new osg::Group(); { //Relative osg::PositionAttitudeTransform* pat = new osg::PositionAttitudeTransform(); pat->setPosition(osg::Vec3(-10,0,0)); pat->addChild(osgDB::readNodeFile("cow.osg")); pat->setReferenceFrame(osg::Transform::RELATIVE_RF); group->addChild(pat); } { //Absolute osg::PositionAttitudeTransform* pat = new osg::PositionAttitudeTransform(); pat->addChild(osgDB::readNodeFile("cow.osg")); pat->setReferenceFrame(osg::Transform::ABSOLUTE_RF); //pat->setReferenceFrame(osg::Transform::RELATIVE_RF); pat->setPosition(osg::Vec3(10,0,0)); group->addChild(pat); } group->setEventCallback(new CEventCallback()); viewer.setSceneData(group); viewer.getCamera()->setCullingMode(osg::CullSettings::CullingModeValues::NO_CULLING); if i change pat->setReferenceFrame(osg::Transform::ABSOLUTE_RF); to pat->setReferenceFrame(osg::Transform::RELATIVE_RF); the two cows are here, but when the second pat is absolute, the second cow won't show... however i can actually pick it if i click on the area where it should be. I don't understand why it's not working... can someone helps me ? You can find the source file attached to this mail. i've made this test program because i have another problem where i try to pick an object which is in a pat with ABSOLUTE_RF, and can't make it work (i can pick all others objects but not the ones with absolute_rf...) Thanks --- Guillaume Tazé
Main.cpp
Description: Binary data
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org