shp polygon display error

classic Classic list List threaded Threaded
1 message Options
罗伯特 罗伯特
Reply | Threaded
Open this post in threaded view
|

shp polygon display error

The first case:
as = style.getOrCreateSymbol<osgEarth::Symbology::PolygonSymbol>();
as->fill()->color() = osgEarth::Symbology::Color::Blue;

result:The image shown is incomplete

The second case:
as = style.getOrCreateSymbol<osgEarth::Symbology::PolygonSymbol>();
as->fill()->color() = osgEarth::Symbology::Color::Blue;
hs = style.getOrCreateSymbol<osgEarth::Symbology::AltitudeSymbol>();
hs->clamping() = osgEarth::Symbology::AltitudeSymbol::CLAMP_TO_TERRAIN;
hs = style.getOrCreateSymbol<osgEarth::Symbology::AltitudeSymbol>();
hs->technique() = osgEarth::Symbology::AltitudeSymbol::TECHNIQUE_DRAPE;

result:The polygon data is not displayed

When I do this in the earth file:
 <styles>
            <style type="text/css"> usa { altitude-clamping:terrain-drape; fill: #ff0000; } </style>        </styles>
result: Full data display
 
What am I supposed to do?