Hi Allen, see osgplanets example to have a implementation of the nodeTrackerManipulator.
Hope this can help. Regards, Vincent. 2009/6/18 Allen Saucier <[email protected]> > Hi, > > I am trying to use the nodetrackermanipulator and I am certainly doing > something wrong. Does anyone know of an example on how to use this class? > > Here is the code that I am using to setup a node tracker manipulator to > follow a node. But I can not even get the tracker to follow the node. > > If you know, could someone tell me what I'm missing? > > > osgGA::NodeTrackerManipulator::TrackerMode trackerMode = > osgGA::NodeTrackerManipulator::NODE_CENTER_AND_ROTATION; > osgGA::NodeTrackerManipulator::RotationMode rotationMode = > osgGA::NodeTrackerManipulator::TRACKBALL; > osg::ref_ptr "osgGA::NodeTrackerManipulator" tm = new > osgGA::NodeTrackerManipulator; > tm->setTrackerMode(trackerMode); > tm->setRotationMode(rotationMode); > tm->setMinimumDistance(50.0); > tm->setTrackNode(p_pognNodeToFollow); > tm->setHomePosition(p_ov3dEye, p_ov3dFocus, > p_ov3dUp, false); > > view->setCameraManipulator(tm.get()); > > Thanks!! > (p.s. And I've no idea why I wouldn't want the manipulator to auto calc the > home position. That's just some code I found stumbling around the net. > And the proper brackets are around the osgGA::NodeTrackerManipulator in the > ref_ptr it's just that the brackets are interpreted so I removed them for > this post.) > > ------------------------ > Allen > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=14169#14169 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

