Hi Farshid, On 13 May 2014 22:55, Farshid Lashkari <[email protected]> wrote: > Regarding the change to Node::ParentList, I think this will cause some > breakage. I know I have a lot of code that assumes the elements of > ParentList are group nodes and performs Group operations on them (addChild, > removeChild, etc..).
To help with this issue I've put virtual addChild/removeChild methods into osg::Node that are implemented as non ops, but implemented by osg::Group. I haven't put all the child access methods, just what I needed to get the OSG building cleanly with minimal changes, I am open to adding more as they are required. The other thing you can do is add a asGroup() to access to do a cheap case to Group. This addition would be compatible with older versions of the OSG as well. > Perhaps Geode could be modified to inherit from Group > instead? The add/remove drawable methods could simply be wrappers for > add/remove child. Just throwing the idea out there, I'm sure this would > cause a whole host of other problems though. In general, I think breaking > code is going to be unavoidable. I have considered this, but Geode is built around Drawable so am incline to just leave it as it is. Geode itself actually become less important thanks to promoting Drawable to Node as you can create functional scene graphs without any Geodes. Given this I'm inclined to not change Geode too much, keep it around for purposes of backwards compatiblility. > The bounding sphere/box wrapper class is an interesting solution. I'm > worried about the potential for segfaults though. It might be better to > simply rename the method and force people to update their code at compile > time, rather than dealing with possible segfaults at runtime. Segfaults would be only a problem in new code that assumed that all Node had a BoundingBox they could access. Old code would be fine as it will only ever be using a BoundingBox in conjunction with a Drawable. For new code I'd actually want users to use getBoundingBox() if they wanted the bounding box. I see the Bound helper class as a temporary measure. I'd rather not have it, but I'm aware that changes like promoting Drawable to Node has potential for breaking lots of user code in way that makes it awkward to maintain compatibility with multiple versions of the OSG i.e. compile against OSG-3.x and OSG-3.4 and later. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

