[osg-users] Draw geometry that keeps its size in screen even with user manipulation (scaling, etc)

Trajce Nikolov NICK trajce.nikolov.nick at gmail.com
Mon Nov 21 09:19:45 PST 2016


> Do I need to add an autotransform for each circle?

Probably yes ... Give it a shot

On Mon, Nov 21, 2016 at 6:10 PM, Bruno Oliveira <
bruno.manata.oliveira at gmail.com> wrote:

> Thank you Tracje,
>
> however I tried using that. My node has, for instance, 10 circles that
> represent points and that are at a certain distance. I use autotransform on
> the whole node of 10 circles with "setAutoScaleToScreen(true);" but what
> happens is that when I zoom my scene, the distance between the circles does
> not change.
> Do I need to add an autotransform for each circle?
>
> 2016-11-21 16:20 GMT+00:00 Trajce Nikolov NICK <
> trajce.nikolov.nick at gmail.com>:
>
>> Hi Bruno,
>>
>> maybe you can have a look at osg::AutoTransform
>>
>> On Mon, Nov 21, 2016 at 4:08 PM, Bruno Oliveira <
>> bruno.manata.oliveira at gmail.com> wrote:
>>
>>> Hello,
>>>
>>> I am drawing some basic shapes/geometries (in this case, some rectangles
>>> or circles), but need them to have fixed size in screen pixel coordinates,
>>> even when the user manipulates the scene.
>>>
>>> For instance, I want to draw rectangles that are 10-pixel wide, and keep
>>> these 10 pixels even when the user zooms in or zooms out the scene.
>>>
>>> How can I do this?
>>>
>>>
>>> ( I think this can't be accomplished with osg::Transform::ABSOLUTE_RF,
>>> since I want the shapes to translate/rotate when user manipulates the scene)
>>>
>>> _______________________________________________
>>> osg-users mailing list
>>> osg-users at lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opens
>>> cenegraph.org
>>>
>>>
>>
>>
>> --
>> trajce nikolov nick
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
trajce nikolov nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20161121/d09c94d8/attachment-0003.htm>


More information about the osg-users mailing list