W10 gtx3.x OSG3.6.4

 osgGA::NodeTrackerManipulator::TrackerMode trackerMode = 
osgGA::NodeTrackerManipulator::NODE_CENTER_AND_AZIM;

  osgGA::NodeTrackerManipulator::RotationMode rotationMode = 
osgGA::NodeTrackerManipulator::TRACKBALL;


osg::ref_ptr<osg::Node> glider = osgDB::readRefNodeFile("glider.osgt");
if (glider)
{
        const osg::BoundingSphere& bs = glider->getBound();

        float size = radius/bs.radius()*0.3f;
        osg::MatrixTransform* positioned = new osg::MatrixTransform;
        positioned->setDataVariance(osg::Object::STATIC);
        positioned  ->setMatrix(osg::Matrix::translate(-bs.center())*
                                     osg::Matrix::scale(size,size,size)*
                                    
 osg::Matrix::rotate(osg::inDegrees(-90.0f),0.0f,0.0f,1.0f));

        positioned->addChild(glider);

        osg::PositionAttitudeTransform* xform = new 
osg::PositionAttitudeTransform;
        xform->setUpdateCallback(new 
osg::AnimationPathCallback(animationPath,0.0,1.0));
        xform->addChild(positioned);

        *  osgGA::NodeTrackerManipulator* tm = new 
osgGA::NodeTrackerManipulator;*
*          tm->setTrackerMode( trackerMode );*
*          tm->setRotationMode( rotationMode );*
*          tm->setTrackNode( xform );*
*          viewer.setCameraManipulator(tm);*
 }

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/7bb98730-bb2d-4f98-ae68-4a70ef9d9c1cn%40googlegroups.com.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to