Rev | Line | |
---|
[162] | 1 | #include "myTerrainTechnique.h" |
---|
| 2 | #include <osgTerrain/TerrainTile> |
---|
| 3 | |
---|
[163] | 4 | using namespace osgTerrain; |
---|
| 5 | |
---|
[162] | 6 | myTerrainTechnique::myTerrainTechnique(void) |
---|
| 7 | { |
---|
[165] | 8 | //OSG_ALWAYS<<className()<<"Constructed by Constructor"<<std::endl; |
---|
[162] | 9 | } |
---|
| 10 | |
---|
[165] | 11 | myTerrainTechnique::myTerrainTechnique(const GeometryTechnique& TerrainTechnique,const osg::CopyOp& copyop): |
---|
| 12 | osgTerrain::GeometryTechnique(TerrainTechnique,copyop) |
---|
[163] | 13 | { |
---|
[165] | 14 | //OSG_ALWAYS<<className()<<"Constructed by Copy-Constructor"<<std::endl; |
---|
[163] | 15 | } |
---|
| 16 | |
---|
[162] | 17 | myTerrainTechnique::~myTerrainTechnique(void) |
---|
| 18 | { |
---|
| 19 | } |
---|
| 20 | |
---|
| 21 | void myTerrainTechnique::update(osgUtil::UpdateVisitor* uv) |
---|
| 22 | { |
---|
[167] | 23 | //HeightFieldLayer* hfl = dynamic_cast<HeightFieldLayer*>( getTerrainTile()->getElevationLayer() ); |
---|
| 24 | //osg::HeightField* h = hfl->getHeightField(); |
---|
[162] | 25 | |
---|
[167] | 26 | //float height = h->getHeight( 0,0 ); |
---|
| 27 | ////OSG_ALWAYS<<"retrieved height: " << height << std::endl; |
---|
| 28 | //height +=50000; |
---|
| 29 | //h->setHeight( 0,0, height); |
---|
| 30 | //OSG_ALWAYS<<"modified height: " << height << std::endl; |
---|
| 31 | ////getTerrainTile()->setDirty( true ); // Neccessary |
---|
| 32 | |
---|
| 33 | |
---|
[165] | 34 | GeometryTechnique::update( uv); |
---|
[166] | 35 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.