source: experimental/TerrainTest/rampedEllipsoidTechnique.h @ 272

Last change on this file since 272 was 272, checked in by Torben Dannhauer, 13 years ago
File size: 1.4 KB
Line 
1#pragma once
2/* -*-c++-*- osgVisual - Copyright (C) 2009-2011 Torben Dannhauer
3 *
4 * This library is based on OpenSceneGraph, open source and may be redistributed and/or modified under
5 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
6 * (at your option) any later version.  The full license is in LICENSE file
7 * included with this distribution, and on the openscenegraph.org website.
8 *
9 * osgVisual requires for some proprietary modules a license from the correspondig manufacturer.
10 * You have to aquire licenses for all used proprietary modules.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * OpenSceneGraph Public License for more details.
16*/
17
18#include "terrainModificationTechnique.h"
19#include <limits>
20
21
22
23class rampedEllipsoidTechnique : public terrainModificationTechnique
24{
25public:
26        rampedEllipsoidTechnique();
27        ~rampedEllipsoidTechnique();
28
29        void modifyHeightfield(region& modificationROI, osg::HeightField* h, region tileExtends);
30        void setModifiedHeight(double height) {_height=height;}
31        void setRampWidthFactor(double rampWidthFactor) {_rampWidthFactor=rampWidthFactor;}
32
33private:
34        double round(double x) {return (x > 0.5) ? ceil(x) : floor(x);}
35        double _height;
36        double _rampWidthFactor;
37};
Note: See TracBrowser for help on using the repository browser.