Intersection depthfilter (#8408)

* Implement a simple depth filter to cut all geometry below a certain level for intersections
* Add option to override all curve intersection cut depths from collection.
* Add support for showing intersection above or below threshold. Update label texts.
This commit is contained in:
jonjenssen
2022-01-05 15:52:04 +01:00
committed by GitHub
parent eeb51bd8f1
commit 55ba4bc802
11 changed files with 462 additions and 20 deletions

View File

@@ -428,6 +428,29 @@ String BoundingBox::debugString() const
return str;
}
//--------------------------------------------------------------------------------------------------
/// Cuts the box at the given depth, to never go below the given depth
///
/// Note: cutting is a one time operation, adding new points to the box might extend the box below the cut depth
//--------------------------------------------------------------------------------------------------
void BoundingBox::cutBelow(double depth)
{
if (m_min.z() < depth) m_min.z() = depth;
if (m_max.z() < depth) m_max.z() = depth;
}
//--------------------------------------------------------------------------------------------------
/// Cuts the box at the given depth, to never go above the given depth
///
/// Note: cutting is a one time operation, adding new points to the box might extend the box below the cut depth
//--------------------------------------------------------------------------------------------------
void BoundingBox::cutAbove(double depth)
{
if (m_min.z() > depth) m_min.z() = depth;
if (m_max.z() > depth) m_max.z() = depth;
}
} // namespace cvf

View File

@@ -86,6 +86,9 @@ public:
void transform(const Mat4d& matrix);
const BoundingBox getTransformed(const Mat4d& matrix) const;
void cutBelow(double depth);
void cutAbove(double depth);
String debugString() const;
private: