- Timestamp:
- 10/13/04 15:39:27 (9 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgsimulation/osgsimulation.cpp
r3470 r3490 91 91 _latitude(0.0), 92 92 _longitude(0.0), 93 _height(10000 .0)93 _height(100000.0) 94 94 {} 95 95 96 96 void updateParameters() 97 97 { 98 _latitude -= ((2.0*osg::PI)/360.0)/ 100.0;98 _latitude -= ((2.0*osg::PI)/360.0)/20.0; 99 99 } 100 100 … … 193 193 194 194 viewer.getCullSettings().setComputeNearFarMode(osg::CullSettings::COMPUTE_NEAR_FAR_USING_PRIMITIVES); 195 viewer.getCullSettings().setNearFarRatio(0.000 1f);195 viewer.getCullSettings().setNearFarRatio(0.00001f); 196 196 197 197 // get details on keyboard and mouse bindings used by the viewer. … … 228 228 if (cessna) 229 229 { 230 double s = 30000.0 / cessna->getBound().radius(); 231 232 osg::MatrixTransform* scaler = new osg::MatrixTransform; 233 scaler->addChild(cessna); 234 scaler->setMatrix(osg::Matrixd::scale(s,s,s)); 235 scaler->getOrCreateStateSet()->setMode(GL_RESCALE_NORMAL,osg::StateAttribute::ON); 236 230 237 osg::MatrixTransform* mt = new osg::MatrixTransform; 231 mt->addChild( cessna);238 mt->addChild(scaler); 232 239 mt->setUpdateCallback(new ModelPositionCallback); 233 240 … … 235 242 236 243 osgGA::NodeTrackerManipulator* tm = new osgGA::NodeTrackerManipulator; 237 tm->setTrackNode( cessna);244 tm->setTrackNode(scaler); 238 245 239 246 unsigned int num = viewer.addCameraManipulator(tm);
