Rev | Line | |
---|
[264] | 1 | #pragma once |
---|
[262] | 2 | #include <osg/Referenced> |
---|
| 3 | #include <osgTerrain/GeometryTechnique> |
---|
| 4 | #include <osg/Vec4d> |
---|
[264] | 5 | #include <osgTerrain/TerrainTile> |
---|
[262] | 6 | |
---|
| 7 | |
---|
| 8 | /** |
---|
| 9 | * \brief This class is the interface definition class for modifying terrain data. Must be subclassed to implement own terrain modification techniques. |
---|
| 10 | * |
---|
| 11 | * @author Torben Dannhauer |
---|
| 12 | * @date Feb 2011 |
---|
| 13 | */ |
---|
| 14 | class terrainModificationTechnique : public osg::Referenced |
---|
| 15 | { |
---|
| 16 | public: |
---|
| 17 | terrainModificationTechnique(); |
---|
| 18 | virtual ~terrainModificationTechnique(); |
---|
| 19 | |
---|
| 20 | /** |
---|
| 21 | * \brief This function performs the terrain data modification. Must be subclassed. |
---|
| 22 | * |
---|
[266] | 23 | * @param modificationROI This vector contains the extents of the region of interest which should be modified: lat_min, lat_max, long_min, long_max |
---|
[262] | 24 | * @param h : Heightfield of the tile which should be modified |
---|
[265] | 25 | * @param tileExtends : This vector contains the extents of the tile: lat_min, lat_max, long_min, long_max |
---|
[262] | 26 | */ |
---|
| 27 | virtual void modifyHeightfield(osg::Vec4d& modificationROI, osg::HeightField* h, osg::Vec4d tileExtends)=0; |
---|
| 28 | |
---|
[265] | 29 | protected: |
---|
| 30 | void clampValue(double& value, double min, double max){if(value<min)value=min;if(value>max)value=max;} |
---|
| 31 | void clampValue(int& value, int min, int max){if(value<min)value=min;if(value>max)value=max;} |
---|
[262] | 32 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.