[osg-users] pfObject::getNamedUserDataSlot
Tony Vasile
minghia at gmail.com
Thu Sep 10 00:46:44 PDT 2015
Hi Nick & Robert,
That's not quite the same functionality as it appears that in Performer there is some sort of memory/map that is used to map a user defined name as a string to a slot number. You then add data to the node using this slot number. Performer does have a call to setUserData which takes the data as its argument but it installs the data in slot 0. There is another setUserData that takes two argument, with the first argument being a slot number. I assume that getNamedUserDataSlot is just an allocation scheme between the string name and and a magic number which represents the slot.
That's cool this sort of functionality I could easily replicated with a couple of maps or a vector.
Thanks for your help.
------------------------
Tony V
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=65089#65089
More information about the osg-users
mailing list