Eduardo Poyart wrote on 2011-03-28: > But I can't add an osg::Object to an osg::Group... I want my data to be > saved with the scene, so I made it derive from osg::Node and added it > to my root group. Unless there is another way?
You can add it as user data (see osg::Object::setUserData()) if it is an osg::Object. It looks like user data is serialized. > On Mon, Mar 28, 2011 at 11:00 AM, Robert Osfield > <[email protected]> wrote: > > On Mon, Mar 28, 2011 at 6:52 PM, Eduardo Poyart <[email protected]> > wrote: > I did it with the serializers. The document on the Wiki helped > a lot. I > would be lost without it. > The only funny thing is that I > had to make my class derive from Node and add > it to the scene graph, > even though it's not graphics related at all! > > > I don't know the specifics of your case, but serializers work for any > object subclassed from osg::Object so there isn't any need to > subclass > from osg::Node. So if you had some custom user data you could > subclass from osg::Object and then provide the serializers for this > subclass and in theory the serilizers should then output your object. -- Bryan Thrall FlightSafety International [email protected] _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

