Changeset 308 for experimental/distortionNG
- Timestamp:
- Jul 26, 2011, 8:12:25 AM (13 years ago)
- Location:
- experimental/distortionNG
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/distortionNG/distortionNG.h
r307 r308 1 1 #pragma once 2 2 3 class distortionNG : 4 public osg::Referenced 3 #include<osg/Referenced> 4 5 class distortionNG : public osg::Referenced 5 6 { 6 7 public: -
experimental/distortionNG/main.cpp
r307 r308 88 88 viewer.addEventHandler(new osgViewer::ScreenCaptureHandler); 89 89 90 91 // obtain the vertical scale92 float verticalScale = 1.0f;93 while(arguments.read("-v",verticalScale)) {}94 95 // obtain the sample ratio96 float sampleRatio = 1.0f;97 while(arguments.read("-r",sampleRatio)) {}98 99 90 // load the nodes from the commandline arguments. 100 91 osg::Node* rootnode = osgDB::readNodeFiles(arguments); … … 102 93 if (!rootnode) 103 94 { 104 osg::notify(osg:: NOTICE)<<"Warning: no valid data loaded, please specify a database on the command line."<<std::endl;95 osg::notify(osg::WARN)<<"Warning: no valid data loaded, please specify a database on the command line."<<std::endl; 105 96 return 1; 106 97 } 107 98 108 terrain->setSampleRatio(sampleRatio);109 terrain->setVerticalScale(verticalScale);110 terrain->setBlendingPolicy(blendingPolicy);111 //osg::ref_ptr<osgTerrain::TerrainTechnique> myT = new osgTerrain::myTerrainTechnique();112 //terrain->setTerrainTechniquePrototype( myT );113 114 115 // Use Tile load Callback116 osg::ref_ptr<osgTerrain::GeometryTechniquePrototypeWorkaroundTLC<osgTerrain::myTerrainTechnique> > tlcb = new osgTerrain::GeometryTechniquePrototypeWorkaroundTLC<osgTerrain::myTerrainTechnique>();117 osgTerrain::TerrainTile::setTileLoadedCallback(tlcb);118 119 // register our custom handler for adjust Terrain settings120 viewer.addEventHandler(new TerrainHandler(terrain));121 99 122 100 // add a viewport to the viewer and attach the scene graph.
Note: See TracChangeset
for help on using the changeset viewer.