Rev | Line | |
---|
[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 | |
---|
| 23 | class rampedEllipsoidTechnique : public terrainModificationTechnique |
---|
| 24 | { |
---|
| 25 | public: |
---|
| 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 | |
---|
| 33 | private: |
---|
[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.