source: experimental/TerrainTest/rampedEllipsoidTechnique.h @ 273

Last change on this file since 273 was 272, checked in by Torben Dannhauer, 14 years ago
File size: 1.4 KB
RevLine 
[264]1#pragma once
[272]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
[264]18#include "terrainModificationTechnique.h"
[266]19#include <limits>
[264]20
21
22
23class rampedEllipsoidTechnique : public terrainModificationTechnique
24{
25public:
26        rampedEllipsoidTechnique();
27        ~rampedEllipsoidTechnique();
28
[269]29        void modifyHeightfield(region& modificationROI, osg::HeightField* h, region tileExtends);
[264]30        void setModifiedHeight(double height) {_height=height;}
[265]31        void setRampWidthFactor(double rampWidthFactor) {_rampWidthFactor=rampWidthFactor;}
[264]32
33private:
[266]34        double round(double x) {return (x > 0.5) ? ceil(x) : floor(x);}
[264]35        double _height;
[265]36        double _rampWidthFactor;
[264]37};
Note: See TracBrowser for help on using the repository browser.