osgEarth 2.1.1

/home/cube/sources/osgearth/src/osgEarthSymbology/ExtrusionSymbol

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 #ifndef OSGEARTHSYMBOLOGY_EXTRUSION_SYMBOL_H
00020 #define OSGEARTHSYMBOLOGY_EXTRUSION_SYMBOL_H 1
00021 
00022 #include <osgEarthSymbology/Common>
00023 #include <osgEarthSymbology/Symbol>
00024 #include <osgEarthSymbology/Expression>
00025 
00026 namespace osgEarth { namespace Symbology
00027 {
00028     using namespace osgEarth;
00029 
00034     class OSGEARTHSYMBOLOGY_EXPORT ExtrusionSymbol : public Symbol
00035     {
00036     public:
00037         // @deprecated
00038         enum HeightReference
00039         {
00043             HEIGHT_REFERENCE_Z,
00044 
00048             HEIGHT_REFERENCE_MSL
00049         };
00050 
00051     public:
00052         ExtrusionSymbol( const Config& conf =Config() );
00053 
00056         optional<float>& height() { return _height; }
00057         const optional<float>& height() const { return _height; }
00058 
00060         optional<NumericExpression>& heightExpression() { return _heightExpr; }
00061         const optional<NumericExpression>& heightExpression() const { return _heightExpr; }
00062 
00064         // @deprecated
00065         optional<HeightReference>& heightReference() { return _heightRef; }
00066         const optional<HeightReference>& heightReference() const { return _heightRef; }
00067 
00069         optional<bool>& flatten() { return _flatten; }
00070         const optional<bool>& flatten() const { return _flatten; }
00071 
00073         optional<std::string>& wallStyleName() { return _wallStyleName; }
00074         const optional<std::string>& wallStyleName() const { return _wallStyleName; }
00075 
00077         optional<std::string>& roofStyleName() { return _roofStyleName; }
00078         const optional<std::string>& roofStyleName() const { return _roofStyleName; }
00079         
00080     public:
00081         virtual Config getConfig() const;
00082         virtual void mergeConfig( const Config& conf );
00083 
00084     protected:
00085         optional<float>             _height;
00086         optional<bool>              _flatten;
00087         optional<NumericExpression> _heightExpr;
00088         optional<HeightReference>   _heightRef;
00089         optional<std::string>       _wallStyleName;
00090         optional<std::string>       _roofStyleName;
00091     };
00092 
00093 } } // namespace osgEarth::Symbology
00094 
00095 #endif // OSGEARTHSYMBOLOGY_EXTRUSION_SYMBOL_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines