mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add quicker method for adding bounding boxes to bounding boxes.
This commit is contained in:
parent
e966184d99
commit
d04bf2da8a
@ -202,6 +202,20 @@ void BoundingBox::add(const BoundingBox& bb)
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void BoundingBox::addValid(const BoundingBox& bb)
|
||||
{
|
||||
if (bb.m_min.x() < m_min.x()) m_min.x() = bb.m_min.x();
|
||||
if (bb.m_min.y() < m_min.y()) m_min.y() = bb.m_min.y();
|
||||
if (bb.m_min.z() < m_min.z()) m_min.z() = bb.m_min.z();
|
||||
|
||||
if (bb.m_max.x() > m_max.x()) m_max.x() = bb.m_max.x();
|
||||
if (bb.m_max.y() > m_max.y()) m_max.y() = bb.m_max.y();
|
||||
if (bb.m_max.z() > m_max.z()) m_max.z() = bb.m_max.z();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Computes center of the bounding box
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -68,6 +68,7 @@ public:
|
||||
void add(const Vec3fArray& vertices);
|
||||
void add(const Vec3dArray& vertices);
|
||||
void add(const BoundingBox& bb);
|
||||
void addValid(const BoundingBox& bb);
|
||||
|
||||
const Vec3d& min() const;
|
||||
const Vec3d& max() const;
|
||||
|
Loading…
Reference in New Issue
Block a user