osgEarth 2.1.1
Public Types | Public Member Functions | Protected Attributes

osgEarth::Symbology::ExtrusionSymbol Class Reference

Inheritance diagram for osgEarth::Symbology::ExtrusionSymbol:
Collaboration diagram for osgEarth::Symbology::ExtrusionSymbol:

List of all members.

Public Types

enum  HeightReference { HEIGHT_REFERENCE_Z, HEIGHT_REFERENCE_MSL }

Public Member Functions

 ExtrusionSymbol (const Config &conf=Config())
optional< float > & height ()
const optional< float > & height () const
optional< NumericExpression > & heightExpression ()
const optional
< NumericExpression > & 
heightExpression () const
optional< HeightReference > & heightReference ()
const optional< HeightReference > & heightReference () const
optional< bool > & flatten ()
const optional< bool > & flatten () const
optional< std::string > & wallStyleName ()
const optional< std::string > & wallStyleName () const
optional< std::string > & roofStyleName ()
const optional< std::string > & roofStyleName () const
virtual Config getConfig () const
virtual void mergeConfig (const Config &conf)

Protected Attributes

optional< float > _height
optional< bool > _flatten
optional< NumericExpression_heightExpr
optional< HeightReference_heightRef
optional< std::string > _wallStyleName
optional< std::string > _roofStyleName

Detailed Description

Symbol that directs the GeometryCompiler to create extruded 3D geometry from 2D vector data.

Definition at line 34 of file ExtrusionSymbol.


Member Enumeration Documentation

Enumerator:
HEIGHT_REFERENCE_Z 

Means that the "height" value as provided in this symbol is expressed relative to the Z of the input geometry. This is the usual way to extrude geometry- extrude up from the geometry's base Z height. (default.)

HEIGHT_REFERENCE_MSL 

Means the "height" value is expressed in absolute terms, i.e., relative to MSL (mean sea level, which is usually the map's ellipsoid). If your height value is an absolute elevation, use this to "extrude down" to the terrain.

Definition at line 38 of file ExtrusionSymbol.


Constructor & Destructor Documentation

ExtrusionSymbol::ExtrusionSymbol ( const Config conf = Config())

Definition at line 24 of file ExtrusionSymbol.cpp.

                                                     :
Symbol    ( conf ),
_height   ( 10.0 ),
_flatten  ( true ),
_heightRef( HEIGHT_REFERENCE_Z )
{
    if ( !conf.empty() )
        mergeConfig(conf);
}

Here is the call graph for this function:


Member Function Documentation

optional<bool>& osgEarth::Symbology::ExtrusionSymbol::flatten ( ) [inline]

Whether the top cap of the extruded geometry should be flat (default=true)

Definition at line 69 of file ExtrusionSymbol.

{ return _flatten; }

Here is the caller graph for this function:

const optional<bool>& osgEarth::Symbology::ExtrusionSymbol::flatten ( ) const [inline]

Definition at line 70 of file ExtrusionSymbol.

{ return _flatten; }
Config ExtrusionSymbol::getConfig ( ) const [virtual]

Reimplemented from osgEarth::Symbology::Symbol.

Definition at line 35 of file ExtrusionSymbol.cpp.

{
    Config conf = Symbol::getConfig();
    conf.key() = "extrusion";
    conf.addIfSet   ( "height",            _height );
    conf.addIfSet   ( "flatten",           _flatten );
    conf.addObjIfSet( "height_expression", _heightExpr );
    conf.addIfSet   ( "height_reference", "z",   _heightRef, HEIGHT_REFERENCE_Z );
    conf.addIfSet   ( "height_reference", "msl", _heightRef, HEIGHT_REFERENCE_MSL );
    conf.addIfSet   ( "wall_style", _wallStyleName );
    conf.addIfSet   ( "roof_style", _roofStyleName );
    return conf;
}

Here is the call graph for this function:

const optional<float>& osgEarth::Symbology::ExtrusionSymbol::height ( ) const [inline]

Definition at line 57 of file ExtrusionSymbol.

{ return _height; }
optional<float>& osgEarth::Symbology::ExtrusionSymbol::height ( ) [inline]

Height to which to extrude geometry above the footprint (for HEIGHT_REFERENCE_Z) or above MSL (for HEIGHT_REFERENCE_MSL)

Definition at line 56 of file ExtrusionSymbol.

{ return _height; }
const optional<NumericExpression>& osgEarth::Symbology::ExtrusionSymbol::heightExpression ( ) const [inline]

Definition at line 61 of file ExtrusionSymbol.

{ return _heightExpr; }
optional<NumericExpression>& osgEarth::Symbology::ExtrusionSymbol::heightExpression ( ) [inline]

Simple expression to evaluate to get height

Definition at line 60 of file ExtrusionSymbol.

{ return _heightExpr; }

Here is the caller graph for this function:

optional<HeightReference>& osgEarth::Symbology::ExtrusionSymbol::heightReference ( ) [inline]

Reference frame in which height is expressed

Definition at line 65 of file ExtrusionSymbol.

{ return _heightRef; }
const optional<HeightReference>& osgEarth::Symbology::ExtrusionSymbol::heightReference ( ) const [inline]

Definition at line 66 of file ExtrusionSymbol.

{ return _heightRef; }
void ExtrusionSymbol::mergeConfig ( const Config conf) [virtual]

Definition at line 50 of file ExtrusionSymbol.cpp.

{
    conf.getIfSet   ( "height",  _height );
    conf.getIfSet   ( "flatten", _flatten );
    conf.getObjIfSet( "height_expression", _heightExpr );
    conf.getIfSet   ( "height_reference", "z",   _heightRef, HEIGHT_REFERENCE_Z );
    conf.getIfSet   ( "height_reference", "msl", _heightRef, HEIGHT_REFERENCE_MSL );
    conf.getIfSet   ( "wall_style", _wallStyleName );
    conf.getIfSet   ( "roof_style", _roofStyleName );
}

Here is the call graph for this function:

Here is the caller graph for this function:

const optional<std::string>& osgEarth::Symbology::ExtrusionSymbol::roofStyleName ( ) const [inline]

Definition at line 78 of file ExtrusionSymbol.

{ return _roofStyleName; }
optional<std::string>& osgEarth::Symbology::ExtrusionSymbol::roofStyleName ( ) [inline]

Name of a style describing how to symbolize the elevated rooftop

Definition at line 77 of file ExtrusionSymbol.

{ return _roofStyleName; }

Here is the caller graph for this function:

optional<std::string>& osgEarth::Symbology::ExtrusionSymbol::wallStyleName ( ) [inline]

Name of a style describing how to symbolize the extruded walls

Definition at line 73 of file ExtrusionSymbol.

{ return _wallStyleName; }

Here is the caller graph for this function:

const optional<std::string>& osgEarth::Symbology::ExtrusionSymbol::wallStyleName ( ) const [inline]

Definition at line 74 of file ExtrusionSymbol.

{ return _wallStyleName; }

Member Data Documentation

Definition at line 86 of file ExtrusionSymbol.

Definition at line 85 of file ExtrusionSymbol.

Definition at line 87 of file ExtrusionSymbol.

Definition at line 88 of file ExtrusionSymbol.

Definition at line 90 of file ExtrusionSymbol.

Definition at line 89 of file ExtrusionSymbol.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines