Line | |
---|
1 | #include "myTerrainTechnique.h" |
---|
2 | #include <osgTerrain/TerrainTile> |
---|
3 | |
---|
4 | using namespace osgTerrain; |
---|
5 | |
---|
6 | myTerrainTechnique::myTerrainTechnique(void) |
---|
7 | { |
---|
8 | //OSG_ALWAYS<<className()<<"Constructed by Constructor"<<std::endl; |
---|
9 | } |
---|
10 | |
---|
11 | myTerrainTechnique::myTerrainTechnique(const GeometryTechnique& TerrainTechnique,const osg::CopyOp& copyop): |
---|
12 | osgTerrain::GeometryTechnique(TerrainTechnique,copyop) |
---|
13 | { |
---|
14 | //OSG_ALWAYS<<className()<<"Constructed by Copy-Constructor"<<std::endl; |
---|
15 | } |
---|
16 | |
---|
17 | myTerrainTechnique::~myTerrainTechnique(void) |
---|
18 | { |
---|
19 | } |
---|
20 | |
---|
21 | void myTerrainTechnique::update(osgUtil::UpdateVisitor* uv) |
---|
22 | { |
---|
23 | //HeightFieldLayer* hfl = dynamic_cast<HeightFieldLayer*>( getTerrainTile()->getElevationLayer() ); |
---|
24 | //osg::HeightField* h = hfl->getHeightField(); |
---|
25 | |
---|
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 | |
---|
34 | GeometryTechnique::update( uv); |
---|
35 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.