Check for valid bounding boxes before testing for intersection

This commit is contained in:
Magne Sjaastad 2015-09-15 09:46:32 +02:00
parent 7f2aa1c389
commit 4cf3d9ff5f

View File

@ -698,6 +698,8 @@ void RimView::setScaleZAndUpdate(double scaleZ)
//--------------------------------------------------------------------------------------------------
bool RimView::isBoundingBoxesOverlappingOrClose(const cvf::BoundingBox& sourceBB, const cvf::BoundingBox& destBB)
{
if (!sourceBB.isValid() || !destBB.isValid()) return false;
if (sourceBB.intersects(destBB)) return true;
double largestExtent = sourceBB.extent().length();