osgEarth 2.1.1
|
Public Member Functions | |
FeatureLevel (const Config &config) | |
FeatureLevel (float minRange, float maxRange) | |
FeatureLevel (float minRange, float maxRange, const StyleSelector &oneSelector) | |
float | minRange () const |
float | maxRange () const |
const StyleSelectorVector & | selectors () const |
Config | getConfig () const |
Protected Member Functions | |
void | fromConfig (const Config &conf) |
Protected Attributes | |
float | _minRange |
float | _maxRange |
StyleSelectorVector | _selectors |
optional< unsigned > | _lod |
Settings for a single level of detail of feature data
Definition at line 37 of file FeatureDisplayLayout.
FeatureLevel::FeatureLevel | ( | const Config & | config | ) |
Definition at line 28 of file FeatureDisplayLayout.cpp.
: _minRange( 0.0f ), _maxRange( FLT_MAX ) { fromConfig( conf ); }
FeatureLevel::FeatureLevel | ( | float | minRange, |
float | maxRange | ||
) |
FeatureLevel::FeatureLevel | ( | float | minRange, |
float | maxRange, | ||
const StyleSelector & | oneSelector | ||
) |
Definition at line 42 of file FeatureDisplayLayout.cpp.
: _minRange( minRange ), _maxRange( maxRange ) { _selectors.push_back( oneSelector ); }
void FeatureLevel::fromConfig | ( | const Config & | conf | ) | [protected] |
Definition at line 50 of file FeatureDisplayLayout.cpp.
{ if ( conf.hasValue( "min_range" ) ) _minRange = conf.value( "min_range", 0.0f ); if ( conf.hasValue( "max_range" ) ) _maxRange = conf.value( "max_range", FLT_MAX ); conf.getIfSet( "lod", _lod ); const ConfigSet selectorsConf = conf.children( "selector" ); for( ConfigSet::const_iterator i = selectorsConf.begin(); i != selectorsConf.end(); ++i ) { _selectors.push_back( StyleSelector(*i) ); } }
Config FeatureLevel::getConfig | ( | ) | const |
Definition at line 67 of file FeatureDisplayLayout.cpp.
{ Config conf( "level" ); conf.add( "min_range", toString(_minRange) ); conf.add( "max_range", toString(_maxRange) ); conf.addIfSet( "lod", _lod ); for( StyleSelectorVector::const_iterator i = _selectors.begin(); i != _selectors.end(); ++i ) { conf.addChild( (*i).getConfig() ); } return conf; }
float osgEarth::Features::FeatureLevel::maxRange | ( | ) | const [inline] |
Definition at line 45 of file FeatureDisplayLayout.
{ return _maxRange; }
float osgEarth::Features::FeatureLevel::minRange | ( | ) | const [inline] |
Definition at line 44 of file FeatureDisplayLayout.
{ return _minRange; }
const StyleSelectorVector& osgEarth::Features::FeatureLevel::selectors | ( | ) | const [inline] |
Definition at line 50 of file FeatureDisplayLayout.
{ return _selectors; }
optional<unsigned> osgEarth::Features::FeatureLevel::_lod [protected] |
Definition at line 60 of file FeatureDisplayLayout.
float osgEarth::Features::FeatureLevel::_maxRange [protected] |
Definition at line 58 of file FeatureDisplayLayout.
float osgEarth::Features::FeatureLevel::_minRange [protected] |
Definition at line 58 of file FeatureDisplayLayout.
Definition at line 59 of file FeatureDisplayLayout.