Elevation layer

classic Classic list List threaded Threaded
4 messages Options
JD JD
Reply | Threaded
Open this post in threaded view
|

Elevation layer

Hi community!

I use an elevation layer with <elevation/> in an earth file so that i can use the SDK method "oe_terrain_getElevation" for a specific purpose.
But i don't want the terrain to be extruted according to the elevation (I want it always at the 0 altitude).
How can i achieve this?

Thanks,
Jérôme.
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Elevation layer

Jérôme,

You can disable this using a define on a StateSet in your code.

For a specific layer:

layer->getOrCreateStateSet()->setDefine(
    "OE_TERRAIN_RENDER_ELEVATION",
    osg::StateAttribute::OFF);

For the whole map, you need an override:

mapNode->getOrCreateStateSet()->setDefine(
    "OE_TERRAIN_RENDER_ELEVATION",
    osg::StateAttribute::OFF | osg::StateAttribute::OVERRIDE);

Hope this helps.
Glenn Waldron / Pelican Mapping
JD JD
Reply | Threaded
Open this post in threaded view
|

Re: Elevation layer

Thank you!

It seems it is only for REX engine. Is there something similar for MP?
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Elevation layer

No.
Glenn Waldron / Pelican Mapping