Object remains the same size on display when zooming

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

Object remains the same size on display when zooming

Hello,

I need to display some geo-referenced text and an icon on the display which remains the same size when I zoom in/out.

How is this possible? At the moment my text gets smaller when I zoom out. I don't want it to be an overlay as I would like the text to pan with the rest of the scene.

Many thanks

Adrian
ceranco ceranco
Reply | Threaded
Open this post in threaded view
|

Re: Object remains the same size on display when zooming

Hi Adrian,

Try looking at osg::AutoTransform, specifically osg::AutoTransform::setAutoScaleToScreen.

Eran Cohen
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Object remains the same size on display when zooming

In reply to this post by adrianj
Adrian,
Consider using a PlaceNode. There are examples in osgearth_annotation.cpp.
Glenn Waldron / Pelican Mapping