Changeset 163 for experimental/TerrainTest
- Timestamp:
- Nov 24, 2010, 8:58:47 PM (14 years ago)
- Location:
- experimental/TerrainTest
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/TerrainTest/myTerrainTechnique.cpp
r162 r163 2 2 #include <osgTerrain/TerrainTile> 3 3 4 using namespace osgTerrain; 5 4 6 myTerrainTechnique::myTerrainTechnique(void) 5 7 { 8 OSG_ALWAYS<<className()<<"Constructed by Constructor"<<std::endl; 9 } 10 11 myTerrainTechnique::myTerrainTechnique(const TerrainTechnique& TerrainTechnique,const osg::CopyOp& copyop): 12 osgTerrain::TerrainTechnique(TerrainTechnique,copyop) 13 { 14 OSG_ALWAYS<<className()<<"Constructed by Copy-Constructor"<<std::endl; 6 15 } 7 16 -
experimental/TerrainTest/myTerrainTechnique.h
r162 r163 2 2 3 3 #include <osgTerrain/TerrainTechnique> 4 5 namespace osgTerrain { 4 6 5 7 class myTerrainTechnique : public osgTerrain::TerrainTechnique … … 7 9 public: 8 10 myTerrainTechnique(void); 11 12 /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ 13 myTerrainTechnique(const TerrainTechnique&,const osg::CopyOp& copyop=osg::CopyOp::DEEP_COPY_ALL); 14 15 META_Object(osgTerrain, myTerrainTechnique); 16 9 17 ~myTerrainTechnique(void); 10 18 11 19 virtual void update(osgUtil::UpdateVisitor* nv); 12 20 }; 21 22 } -
experimental/TerrainTest/osgterrain.cpp
r162 r163 213 213 terrain->setVerticalScale(verticalScale); 214 214 terrain->setBlendingPolicy(blendingPolicy); 215 osg::ref_ptr<myTerrainTechnique> myT = new myTerrainTechnique(); 216 //terrain->setTerrainTechniquePrototype( myT ); 217 218 osgTerrain::TerrainTile* tile = findTopMostNodeOfType<osgTerrain::TerrainTile>(rootnode); 215 osg::ref_ptr<osgTerrain::TerrainTechnique> myT = new osgTerrain::myTerrainTechnique(); 216 terrain->setTerrainTechniquePrototype( myT ); 217 218 // Manually set the terrain technque for a tile ( his example, the first found tile) works, but then the whole database has to be processed 219 /*osgTerrain::TerrainTile* tile = findTopMostNodeOfType<osgTerrain::TerrainTile>(rootnode); 219 220 if(tile) 220 221 { 221 222 tile->setTerrainTechnique( myT ); 222 } 223 }*/ 223 224 224 225 // register our custom handler for adjust Terrain settings
Note: See TracChangeset
for help on using the changeset viewer.