[osg-users] Add fixed vertical offset to survey layer
Chris Hanson
xenon at alphapixel.com
Mon Jan 29 22:02:16 PST 2018
Would the vertical offset do what you want?
https://github.com/gwaldron/osgearth/blob/master/src/osgEarth/TerrainOptions#L51
Depends on how your objects are clamped to the surface.
On Mon, Jan 29, 2018 at 4:04 PM, Adrian Jelffs <adrian.jelffs at makai.com>
wrote:
> Hi,
>
> I have an application where I have a base layer and a survey layer
> overload using OSG Earth. I then add other objects on top.
>
> I would like to change my survey layer to have a fixed vertical offset of
> -1m. Basically lowering the survey layer so the other objects don't sit
> exactly on the surface. It has to be this way around as the position of the
> objects is more important relative to other items than to the survey layer.
>
> What is the best method to do this? Could somebody provide a simple code
> example? This is my current code:
>
>
>
> Code:
>
> osgEarth::MapOptions mapOptions;
> mapOptions.coordSysType() = osgEarth::MapOptions::CSTYPE_GEOCENTRIC;
> _map = new osgEarth::Map(mapOptions);
>
> GDALOptions gdalOptElevation;
> gdalOptElevation.url() = url;
> elevationLayer = new ElevationLayer(name, gdalOptElevation);
> _map->addElevationLayer(elevationLayer);
>
>
>
>
> Many thanks for your help!
>
> Adrian
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=72884#72884
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
--
Chris 'Xenon' Hanson, omo sanza lettere. Xenon at AlphaPixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS •
osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
iPhone/iPad/iOS • Android
@alphapixel <https://twitter.com/alphapixel> facebook.com/alphapixel (775)
623-PIXL [7495]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180129/4554b57b/attachment.html>
More information about the osg-users
mailing list