osgEarth 2.1.1
Public Types | Public Member Functions | Protected Attributes

osgEarth::Symbology::AltitudeSymbol Class Reference

Inheritance diagram for osgEarth::Symbology::AltitudeSymbol:
Collaboration diagram for osgEarth::Symbology::AltitudeSymbol:

List of all members.

Public Types

enum  Clamping { CLAMP_NONE, CLAMP_TO_TERRAIN, CLAMP_ABSOLUTE, CLAMP_RELATIVE_TO_TERRAIN }

Public Member Functions

 AltitudeSymbol (const Config &conf=Config())
optional< Clamping > & clamping ()
const optional< Clamping > & clamping () const
optional< float > & clampingResolution ()
const optional< float > & clampingResolution () const
optional< NumericExpression > & verticalOffset ()
const optional
< NumericExpression > & 
verticalOffset () const
optional< NumericExpression > & verticalScale ()
const optional
< NumericExpression > & 
verticalScale () const
virtual Config getConfig () const
virtual void mergeConfig (const Config &conf)

Protected Attributes

optional< Clamping_clamping
optional< float > _clampingResolution
optional< NumericExpression_verticalOffset
optional< NumericExpression_verticalScale

Detailed Description

Symbol that conveys information about altitude and terrain interaction

Definition at line 31 of file AltitudeSymbol.


Member Enumeration Documentation

Controls if/how models are clamped to the terrin

Enumerator:
CLAMP_NONE 

Do not clamp Z values to the terrain (but still apply the offset, if applicable)

CLAMP_TO_TERRAIN 

Sample the terrain under the point, and set the feature's Z to the terrain height, ignoring and discarding the feature's original Z value.

CLAMP_ABSOLUTE 

The feature has a attribute value that describes its height above "height zero", which is typically the ellipsoid or MSL. While this will not actually modify the feature's geometry, it will install ...

CLAMP_RELATIVE_TO_TERRAIN 

Sample the terrain under the point, and ADD the terrain height to the feature's pre-existing Z value.

Definition at line 37 of file AltitudeSymbol.


Constructor & Destructor Documentation

AltitudeSymbol::AltitudeSymbol ( const Config conf = Config())

Definition at line 24 of file AltitudeSymbol.cpp.

                                                   :
Symbol             ( conf ),
_clamping          ( CLAMP_NONE ),
_clampingResolution( 0.0f )
{
    mergeConfig( conf );
}

Here is the call graph for this function:


Member Function Documentation

optional<Clamping>& osgEarth::Symbology::AltitudeSymbol::clamping ( ) [inline]

How to clamp instances to the terrain (default is CLAMP_NONE)

Definition at line 60 of file AltitudeSymbol.

{ return _clamping; }

Here is the caller graph for this function:

const optional<Clamping>& osgEarth::Symbology::AltitudeSymbol::clamping ( ) const [inline]

Definition at line 61 of file AltitudeSymbol.

{ return _clamping; }
const optional<float>& osgEarth::Symbology::AltitudeSymbol::clampingResolution ( ) const [inline]

Definition at line 65 of file AltitudeSymbol.

{ return _clampingResolution; }
optional<float>& osgEarth::Symbology::AltitudeSymbol::clampingResolution ( ) [inline]

Terrain resolution at which to perform clamping (in map units)

Definition at line 64 of file AltitudeSymbol.

{ return _clampingResolution; }

Here is the caller graph for this function:

Config AltitudeSymbol::getConfig ( ) const [virtual]

Reimplemented from osgEarth::Symbology::Symbol.

Definition at line 33 of file AltitudeSymbol.cpp.

{
    Config conf;
    conf.key() = "altitude";
    conf.addIfSet   ( "clamping",  "none",     _clamping, CLAMP_NONE );
    conf.addIfSet   ( "clamping",  "terrain",  _clamping, CLAMP_TO_TERRAIN );
    conf.addIfSet   ( "clamping",  "absolute", _clamping, CLAMP_ABSOLUTE );
    conf.addIfSet   ( "clamping",  "relative", _clamping, CLAMP_RELATIVE_TO_TERRAIN );
    conf.addIfSet   ( "clamping_resolution",   _clampingResolution );
    conf.addObjIfSet( "vertical_offset",       _verticalOffset );
    conf.addObjIfSet( "vertical_scale",        _verticalScale );
    return conf;
}

Here is the call graph for this function:

void AltitudeSymbol::mergeConfig ( const Config conf) [virtual]

Definition at line 48 of file AltitudeSymbol.cpp.

{
    conf.getIfSet   ( "clamping",  "none",     _clamping, CLAMP_NONE );
    conf.getIfSet   ( "clamping",  "terrain",  _clamping, CLAMP_TO_TERRAIN );
    conf.getIfSet   ( "clamping",  "absolute", _clamping, CLAMP_ABSOLUTE );
    conf.getIfSet   ( "clamping",  "relative", _clamping, CLAMP_RELATIVE_TO_TERRAIN );
    conf.getIfSet   ( "clamping_resolution",   _clampingResolution );
    conf.getObjIfSet( "vertical_offset",       _verticalOffset );
    conf.getObjIfSet( "vertical_scale",        _verticalScale );
}

Here is the call graph for this function:

Here is the caller graph for this function:

optional<NumericExpression>& osgEarth::Symbology::AltitudeSymbol::verticalOffset ( ) [inline]

Vertical offset of geometry after clamping

Definition at line 68 of file AltitudeSymbol.

{ return _verticalOffset; }

Here is the caller graph for this function:

const optional<NumericExpression>& osgEarth::Symbology::AltitudeSymbol::verticalOffset ( ) const [inline]

Definition at line 69 of file AltitudeSymbol.

{ return _verticalOffset; }
const optional<NumericExpression>& osgEarth::Symbology::AltitudeSymbol::verticalScale ( ) const [inline]

Definition at line 73 of file AltitudeSymbol.

{ return _verticalScale; }
optional<NumericExpression>& osgEarth::Symbology::AltitudeSymbol::verticalScale ( ) [inline]

Vertical scale factor to apply to geometry's Z after clamping.

Definition at line 72 of file AltitudeSymbol.

{ return _verticalScale; }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 80 of file AltitudeSymbol.

Definition at line 81 of file AltitudeSymbol.

Definition at line 82 of file AltitudeSymbol.

Definition at line 83 of file AltitudeSymbol.


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