osgEarth 2.1.1

/home/cube/sources/osgearth/src/osgEarthSymbology/AltitudeSymbol

Go to the documentation of this file.
00001 /* -*-c++-*- */
00002 /* osgEarth - Dynamic map generation toolkit for OpenSceneGraph
00003  * Copyright 2008-2010 Pelican Mapping
00004  * http://osgearth.org
00005  *
00006  * osgEarth is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU Lesser General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public License
00017  * along with this program.  If not, see <http://www.gnu.org/licenses/>
00018  */
00019 
00020 #ifndef OSGEARTHSYMBOLOGY_ALTITUDE_SYMBOL_H
00021 #define OSGEARTHSYMBOLOGY_ALTITUDE_SYMBOL_H 1
00022 
00023 #include <osgEarthSymbology/Symbol>
00024 #include <osgEarthSymbology/Expression>
00025 
00026 namespace osgEarth { namespace Symbology
00027 {
00031     class OSGEARTHSYMBOLOGY_EXPORT AltitudeSymbol : public Symbol
00032     {
00033     public:
00037         enum Clamping
00038         {
00040             CLAMP_NONE,
00041 
00044             CLAMP_TO_TERRAIN,
00045 
00049             CLAMP_ABSOLUTE,
00050 
00053             CLAMP_RELATIVE_TO_TERRAIN
00054         };
00055 
00056     public:
00057         AltitudeSymbol( const Config& conf =Config() );
00058 
00060         optional<Clamping>& clamping() { return _clamping; }
00061         const optional<Clamping>& clamping() const { return _clamping; }
00062 
00064         optional<float>& clampingResolution() { return _clampingResolution; }
00065         const optional<float>& clampingResolution() const { return _clampingResolution; }
00066 
00068         optional<NumericExpression>& verticalOffset() { return _verticalOffset; }
00069         const optional<NumericExpression>& verticalOffset() const { return _verticalOffset; }
00070 
00072         optional<NumericExpression>& verticalScale() { return _verticalScale; }
00073         const optional<NumericExpression>& verticalScale() const { return _verticalScale; }
00074 
00075     public:
00076         virtual Config getConfig() const;
00077         virtual void mergeConfig( const Config& conf );
00078 
00079     protected:
00080         optional<Clamping>           _clamping;
00081         optional<float>              _clampingResolution;
00082         optional<NumericExpression>  _verticalOffset;
00083         optional<NumericExpression>  _verticalScale;
00084     };
00085 
00086 } } // namespace osgEarth::Symbology
00087 
00088 #endif // OSGEARTH_SYMBOLOGY_SYMBOL_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines