Skip to content

Commit d7e5c6f

Browse files
Create a new attribute to set the max visibility range to separate the time when the tiles are streamed from the time when the tiles are visible
1 parent 4b348d2 commit d7e5c6f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/osgEarthFeatures/FeatureDisplayLayout

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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

src/osgEarthFeatures/FeatureDisplayLayout.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ using namespace osgEarth::Symbology;
2727

2828
FeatureLevel::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
}

0 commit comments

Comments
 (0)