source: experimental/TerrainTest/terrainModificationTechnique.h @ 266

Last change on this file since 266 was 266, checked in by Torben Dannhauer, 13 years ago
File size: 1.2 KB
RevLine 
[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 */ 
14class terrainModificationTechnique : public osg::Referenced
15{
16public:
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]29protected:
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.