W10 gtx3.x OSG3.6.4<div><br></div><div> osgGA::NodeTrackerManipulator::TrackerMode trackerMode = osgGA::NodeTrackerManipulator::NODE_CENTER_AND_AZIM;<br></div><div><br></div><div> osgGA::NodeTrackerManipulator::RotationMode rotationMode = osgGA::NodeTrackerManipulator::TRACKBALL;<br></div><div><br></div><div><br></div><div><div>osg::ref_ptr<osg::Node> glider = osgDB::readRefNodeFile("glider.osgt");</div><div>if (glider)</div><div>{</div><div> const osg::BoundingSphere& bs = glider->getBound();</div><div><br></div><div> float size = radius/bs.radius()*0.3f;</div><div> osg::MatrixTransform* positioned = new osg::MatrixTransform;</div><div> positioned->setDataVariance(osg::Object::STATIC);</div><div> positioned ->setMatrix(osg::Matrix::translate(-bs.center())*</div><div> osg::Matrix::scale(size,size,size)*</div><div> osg::Matrix::rotate(osg::inDegrees(-90.0f),0.0f,0.0f,1.0f));</div><div><br></div><div> positioned->addChild(glider);</div><div><br></div><div> osg::PositionAttitudeTransform* xform = new osg::PositionAttitudeTransform;</div><div> xform->setUpdateCallback(new osg::AnimationPathCallback(animationPath,0.0,1.0));</div><div> xform->addChild(positioned);</div><div><br></div><div> <b> osgGA::NodeTrackerManipulator* tm = new osgGA::NodeTrackerManipulator;</b></div><div><b> tm->setTrackerMode( trackerMode );</b></div><div><b> tm->setRotationMode( rotationMode );</b></div><div><b> tm->setTrackNode( xform );</b></div><div><b> viewer.setCameraManipulator(tm);</b><br></div><div> }</div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users+unsubscribe@googlegroups.com">osg-users+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/7bb98730-bb2d-4f98-ae68-4a70ef9d9c1cn%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/osg-users/7bb98730-bb2d-4f98-ae68-4a70ef9d9c1cn%40googlegroups.com</a>.<br />