mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Check for valid bounding boxes before testing for intersection
This commit is contained in:
parent
7f2aa1c389
commit
4cf3d9ff5f
@ -698,6 +698,8 @@ void RimView::setScaleZAndUpdate(double scaleZ)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RimView::isBoundingBoxesOverlappingOrClose(const cvf::BoundingBox& sourceBB, const cvf::BoundingBox& destBB)
|
bool RimView::isBoundingBoxesOverlappingOrClose(const cvf::BoundingBox& sourceBB, const cvf::BoundingBox& destBB)
|
||||||
{
|
{
|
||||||
|
if (!sourceBB.isValid() || !destBB.isValid()) return false;
|
||||||
|
|
||||||
if (sourceBB.intersects(destBB)) return true;
|
if (sourceBB.intersects(destBB)) return true;
|
||||||
|
|
||||||
double largestExtent = sourceBB.extent().length();
|
double largestExtent = sourceBB.extent().length();
|
||||||
|
Loading…
Reference in New Issue
Block a user