File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,9 @@ namespace osgEarth { namespace Features
5353 optional<float >& maxRange () { return _maxRange; }
5454 const optional<float >& maxRange () const { return _maxRange; }
5555
56+ optional<float >& maxVisibilityRange () { return _maxVisibilityRange; }
57+ const optional<float >& maxVisibilityRange () const { return _maxVisibilityRange; }
58+
5659 /* * Style class (or style selector) name associated with this level (optional) */
5760 optional<std::string>& styleName () { return _styleName; }
5861 const optional<std::string>& styleName () const { return _styleName; }
@@ -69,6 +72,7 @@ namespace osgEarth { namespace Features
6972
7073 optional<float > _minRange;
7174 optional<float > _maxRange;
75+ optional<float > _maxVisibilityRange;
7276 optional<std::string> _styleName;
7377 };
7478
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ using namespace osgEarth::Symbology;
2727
2828FeatureLevel::FeatureLevel ( const Config& conf ) :
2929_minRange( 0 .0f ),
30- _maxRange( FLT_MAX )
30+ _maxRange( FLT_MAX ),
31+ _maxVisibilityRange( FLT_MAX)
3132{
3233 fromConfig ( conf );
3334}
@@ -50,6 +51,7 @@ FeatureLevel::fromConfig( const Config& conf )
5051{
5152 conf.getIfSet ( " min_range" , _minRange );
5253 conf.getIfSet ( " max_range" , _maxRange );
54+ conf.getIfSet ( " max_visibility_range" , _maxVisibilityRange );
5355 conf.getIfSet ( " style" , _styleName );
5456 conf.getIfSet ( " class" , _styleName ); // alias
5557}
@@ -60,6 +62,7 @@ FeatureLevel::getConfig() const
6062 Config conf ( " level" );
6163 conf.addIfSet ( " min_range" , _minRange );
6264 conf.addIfSet ( " max_range" , _maxRange );
65+ conf.addIfSet ( " max_visibility_range" , _maxVisibilityRange );
6366 conf.addIfSet ( " style" , _styleName );
6467 return conf;
6568}
You can’t perform that action at this time.
0 commit comments