From: ehofman Date: Wed, 4 Jun 2003 09:57:11 +0000 (+0000) Subject: A bounding sphere may be empty, which is perfectly valid. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f46bda0621652380b4f06684c6453a1cef48c2d1;p=flightgear.git A bounding sphere may be empty, which is perfectly valid. Such empty spheres have negative radius, but undefined center. --- diff --git a/src/Scenery/hitlist.cxx b/src/Scenery/hitlist.cxx index 856b175a2..630e6685e 100644 --- a/src/Scenery/hitlist.cxx +++ b/src/Scenery/hitlist.cxx @@ -348,7 +348,8 @@ void FGHitList::IntersectBranch( ssgBranch *branch, sgdMat4 m, kid != NULL; kid = branch->getNextKid() ) { - if ( kid->getTraversalMask() & SSGTRAV_HOT ) + if ( kid->getTraversalMask() & SSGTRAV_HOT + && !kid->getBSphere()->isEmpty() ) { sgdVec3 center; sgdSetVec3( center,