Added handled of invlid drawable bounding boxes.

This commit is contained in:
Robert Osfield
2002-11-01 12:11:23 +00:00
parent d9af228892
commit 432654bde8

View File

@@ -276,13 +276,14 @@ void CullVisitor::apply(Geode& node)
}
if (_computeNearFar) updateCalculatedNearFar(matrix,*drawable);
if (_computeNearFar && bb.valid()) updateCalculatedNearFar(matrix,*drawable);
// push the geoset's state on the geostate stack.
StateSet* stateset = drawable->getStateSet();
if (stateset) pushStateSet(stateset);
addDrawableAndDepth(drawable,&matrix,distance(drawable->getBound().center(),matrix));
if (bb.valid()) addDrawableAndDepth(drawable,&matrix,distance(bb.center(),matrix));
else addDrawableAndDepth(drawable,&matrix,0.0f);
if (stateset) popStateSet();