[osg-users] pfObject::getNamedUserDataSlot
Robert Osfield
robert.osfield at gmail.com
Tue Nov 24 00:40:02 PST 2015
Hi Tony,
The name of the osg::Object is used as a key in UserDataContainerL see the
methods:
/** Get the index position of first user data object that matches
specified name.*/
virtual unsigned int getUserObjectIndex(const std::string& name,
unsigned int startPos=0) const = 0;
/** Get first user data object with specified name. */
virtual Object* getUserObject(const std::string& name, unsigned int
startPos=0);
/** Get first const user data object with specified name. */
virtual const Object* getUserObject(const std::string& name,
unsigned int startPos=0) const;
Robert.
On 23 November 2015 at 22:58, Tony Vasile <minghia at gmail.com> wrote:
> Hi Robert,
> We are trying to save classes which have more than simple types or the
> list specified in ValueObject. If we try and save an object which has
> osg::Object has its parent then you get a linker error about missing apply
> routines for SetValueVisitor and GetValueVisitor. I have worked around this
> by using addUserObject and setUserObject. I thought it would have been
> cleaner if we could use a string to token to identified the stored data
> rather than a magic number. The magic number approach is similar to
> Performer.
>
> ------------------------
> Tony V
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=65755#65755
>
>
>
>
>
> _______________________________________________
> 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/20151124/0423f92b/attachment-0003.htm>
More information about the osg-users
mailing list