[osg-users] Custom data within nodes or drawables

Robert Osfield robert.osfield at gmail.com
Thu Aug 24 03:25:43 PDT 2017

HI Antoine,

The osg::Object base class a coarse grained
Object::setUserData(Referenced*) feature, or a fine grained template based
Object::setUserValue(strd::string& name, T value); method.  The later
functionality is managed via UserData using a UserDataContainer class that
agregates use the UserValue's in the form of template UserObjects.

Drawable subclasses from Object so you can get all the functionality you
want for there.


On 24 August 2017 at 10:52, Antoine Rennuit <antoinerennuit at hotmail.com>

> Dear OSG forum,
> I am currently implementing picking and selection inside my app. I have
> setup everything up to the point where I can know the osgUtil::Intersection
> and with it the Drawable that was picked.
> Now, what I am really interested in is not the Drawable or Node itself but
> the object it represents in my DataBase. Hence I would like to associate my
> OSG rendered objects with my DataBase objects. To that intent, is there
> something like a custom data in the Drawables in which I could store a
> pointer to my DataBase objects? Or should I handle this association and
> lookup myself?
> Thank you!
> Antoine
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=71520#71520
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170824/aab32e60/attachment.htm>

More information about the osg-users mailing list