Hi Robert Even if this change break the API, this seem the best choice to keep OSG consistency
Cheers David 2014-06-03 12:05 GMT+02:00 Robert Osfield <[email protected]>: > Hi All, > > I have returned to the task of refactoring of the core OSG to > facilitate the promotion of Drawable to Node status. I have checked > in the following changes: > > 1) I have removed the temporary osg::Bound adapter class, while this > helped with porting there was a couple of cases where crashes were > occurring that were getting awkward to workaround, so rather than make > core more convoluted I have simply removed the class. This does mean > end user code will need to be refactored to handle the fact that > Drawable::getBound() now returns a BoundingSphere, but I believe on > balance this is the better compromise. > > 2) I have refactored osg::Geode so that it now subclasses from > osg::Group rather than osg::Node, and have changed the > Geode::addDrawable/removeDrawable etc. calls to use the > Group::_children list to store the Drawable rather than it's own local > container. This mean that one can call Geode::addChild() rather than > addDrawable(), but addDrawable() just calls addChild() so they are > effectively interchangable. However, the addChild() allows you to add > any type of Node, while addDrawable() just allows you to pass in > Drawable. This means potentially you could mix and match different > node types within a Geode rather than just the Drawables that it once > could. Code that assumes that all children of Geode will be a > Drawable could potentially need updating, however, all old code that > populates a Geode will be fine. For modern usage one wouldn't need to > use a Geode so I don't think this will be a big issue. > > 3) I have removed the composite methods > (addChild/insertChild/removeChild) from osg::Node. > > 4) I have reverted the change to the Node::ParentList, changing from > std::vector<Node*> back to std::vector<Group*>. I have also update > the various getParent() calls in the OSG codebase back to using Group > pointer. > > Change 1 could break the build for some users, while the change 2 to 4 > should help porting as the usage will actually be closer to what > original code base used. > > All these changes are now checked into svn/trunk. > > Cheers, > Robert. > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

