osgEarth 2.1.1
|
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 |
Symbol that conveys information about altitude and terrain interaction
Definition at line 31 of file AltitudeSymbol.
Controls if/how models are clamped to the terrin
Definition at line 37 of file AltitudeSymbol.
Definition at line 24 of file AltitudeSymbol.cpp.
: Symbol ( conf ), _clamping ( CLAMP_NONE ), _clampingResolution( 0.0f ) { mergeConfig( conf ); }
How to clamp instances to the terrain (default is CLAMP_NONE)
Definition at line 60 of file AltitudeSymbol.
{ return _clamping; }
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; }
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; }
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 ); }
optional<NumericExpression>& osgEarth::Symbology::AltitudeSymbol::verticalOffset | ( | ) | [inline] |
Vertical offset of geometry after clamping
Definition at line 68 of file AltitudeSymbol.
{ return _verticalOffset; }
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; }
Definition at line 80 of file AltitudeSymbol.
optional<float> osgEarth::Symbology::AltitudeSymbol::_clampingResolution [protected] |
Definition at line 81 of file AltitudeSymbol.
Definition at line 82 of file AltitudeSymbol.
Definition at line 83 of file AltitudeSymbol.