Multiple StyleSelectors in single FeatureLevel

classic Classic list List threaded Threaded
3 messages Options
Tension Tension
Reply | Threaded
Open this post in threaded view
|

Multiple StyleSelectors in single FeatureLevel

E.g. i have style for trees and style for roads (and their styleselectors respectively), and i want to display them in same specific range (or overlapping ranges), how can i achieve this?

If i add featurelevels in layout like this, only one that was added last is displayed:
layout.addLevel(osgEarth::Features::FeatureLevel(0, 100000, "Trees_Selector"));
layout.addLevel(osgEarth::Features::FeatureLevel(0, 100000, "Roads_Selector"));
And there is no way to add more than 1 styleselector to FeatureLevel, am i right?
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Multiple StyleSelectors in single FeatureLevel

Tension,

Though I would need to go back and refresh the memory on that functionality, I believe that's correct -- you can only have one level at a particular LOD, and the LOD is automatically calculated based on that max_range. So you will need to put your trees and roads in separate layers.
Glenn Waldron / Pelican Mapping
Tension Tension
Reply | Threaded
Open this post in threaded view
|

Re: Multiple StyleSelectors in single FeatureLevel

Hi Glenn! Thanks for answer.

I found this topic: http://forum.osgearth.org/FeatureLevel-adding-multiple-StyleSelector-s-td7204308.html
What happened to this feature? This is exactly what I was looking for.

One more question:

Camera pitch affects FeatureLevels? Say i have layout with 2 feature levels with ranges 0-20000 and 20001-500000 respectively. When i use camera pitch = 90 (perpendicular to the ground), all works fine: in some LOD first level replaced by second. But if i move my camera pitch closer to horizon, far features from first level begin to disappear, instead of replacing by features from second level... Looks like camera pitch affects maxRange, but not minRange. Is it works as intended or i miss something?