Hi All,
Promoting osg::Drawable from being subclassed from osg::Object to osg::Node is really a good idea ? Why osg::Drawable is a subclass of osg::Object in original design ? Which concept are implemented by this design? Except avoid the use of geode, what is the benefice of the new design ? I use many time in my code one Geode with one drawable, and think to myself that could be easiest to just attach a Drawable to a Group. But a drawable is not a node. Don't forget the first coding rules of Agile Software "The Single Responsibility Principle". Drawable (and his subclass) have to handle rendering of something. This is already a big stuff, no need to add node concept in this class. With the new design, osg::Geode is no longer a leaf node neither a group, if it become a group, we need to check in add/removeChild method if the node is a drawable or not, instead of constraint this by design like this is done in original code. osg::ParentList is not longer a "list of osg::Group" ... so other thing that a group could be a parent? any node subclass should be a parent ? We have loose some concept in the process, logic of Node/Group/Geode/Drawable is not really clear. So ask yourself. Why drawable is not a subclass of osg node, and why do we need to use a Geode ? If you have no answer think again. If you have an answer, could we avoid the concept implemented by osg::Geode/osg::Drawable ? My 2 cents David 2014-05-14 18:08 GMT+02:00 Robert Osfield <[email protected]>: > Hi All, > > I have now checked in further improvements to the Drawable/Node Bound > changes. You can now compile and run the OSG with or without the new > Bound adapter class. > > I am still undecided about the merits of the Bound class. My C++ > developer instinct is not have the Bond class and push end user code > to be refactored to use drawable->getBoundingBox() in place of old > getBound() usage. While as caretaker of the OSG codebase I really > don't want to force users to handle broken builds because of change to > the core. > > One thing we could do is just try out how end user applications cope > with the new changes with the Bound class compiled as default, if that > works OK, then disable the default build of the Bound class and then > get feedback from the community about the extent of the build > breakages. > > 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

