Hi Tony, I just had a quick and agree that this particular usage of continue; should include an isCullingActive() to work around this problem.
However, this the actual code is valid, it's the bounding box that is invalid and being treated as valid. Adding the isCullingActive() will hide this problem rather than solve it. What it also won't solve is that the near/far computation will be messed up by this invalid bounding box. Other places in the OSG where the state of the bounding volume isn't determinate I've set the bounding sphere in an invalid state (default constructed BoundingSphere and BoindingBox are set up to be "invalid") so the bounding volume tests are not attempted. In your case where you haven't specified an big enough bounding volume, and the osg::Geometry is naively computing a bounding box it has a "valid" BoundingBox but the actual data in it is invalid. There isn't present a an easy mechanism in osg::Drawable/Geometry to diseble the compute of the bounding sphere, it's something I need to add. The only way you can do it right now is by providing a custom ComputeBoundCallback that returns an default constructed BoundingBox. My recommendation right now would be to create such a ComputeBoundCallback. I will need to have a look at the osg::Drawable's BoundingBox API to provide a better means for setting a BoundingBox and disabling the computeBound. I'm currently prepared for trip a and will be away next week so can't look at this right away. Robert.
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

