This is typically done by adding userdata, which happens to be supported by 
each osg:Object (including nodes) in OpenSceneGraph. 

>From source in osg::Object


Code:
        /**
         * Set user data, data must be subclassed from Referenced to allow
         * automatic memory handling.  If your own data isn't directly 
         * subclassed from Referenced then create an adapter object
         * which points to your own object and handles the memory addressing.
         */
        inline void setUserData(Referenced* obj) { _userData = obj; }
        
        /** Get user data.*/
        inline Referenced* getUserData() { return _userData.get(); }
        
        /** Get const user data.*/
        inline const Referenced* getUserData() const { return _userData.get(); }




regards,

Roland Smeenk

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=16180#16180





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to