On 21.11.2015 15:35, Jannik Heller wrote:
Hi Robert! That's a nice idea, unfortunately the isCulled(const BoundingSphere&) is inlined (understandably) so I can't override it. I could override each accept(Node&) type method and do the check there but that results in a bit of code duplication.
Hi Jannik, Agreed. Overriding each and every CullVisitor::apply is not an option and the isCulled(...) is inlined for a good reason. However, if your "empty" subgraph has well know structure, for example it begins with osg::Group, you could mark it with some node mask flag or user data flag, and then all you have to do is to override apply(osg::Group& node) and reject it based on pre-set mask/flag. I believe patching isCulled is unnecessary since it will introduce overhead for everything else. Of course, it is entirely possible that I don't understand what your final goal is... Cheers, Robert Milharcic _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
