Fix intersection depth filter limit calculations

This commit is contained in:
Jon Jenssen
2022-08-01 15:42:26 +02:00
committed by Magne Sjaastad
parent 65600f58b3
commit 2e3ac5b02b
4 changed files with 17 additions and 19 deletions

View File

@@ -291,11 +291,9 @@ void RivExtrudedCurveIntersectionGeometryGenerator::calculateArrays()
calculateLineSegementTransforms();
calculateTransformedPolyline();
const double gridRadius = gridBBox.radius();
// set up our horizontal cut planes
const double topDepth = -1.0 * m_intersection->upperFilterDepth( gridRadius );
const double bottomDepth = -1.0 * m_intersection->lowerFilterDepth( gridRadius );
const double topDepth = m_intersection->upperFilterDepth( gridBBox.max().z() );
const double bottomDepth = m_intersection->lowerFilterDepth( gridBBox.min().z() );
std::array<cvf::Vec3d, 8> corners;
gridBBox.cornerVertices( corners.data() );

View File

@@ -237,7 +237,7 @@ void RivExtrudedCurveIntersectionPartMgr::generatePartGeometry()
if ( m_intersectionGenerator.isNull() ) return;
if ( m_rimIntersection->depthFilterType() == RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN &&
( m_rimIntersection->lowerFilterDepth( 1.0 ) <= m_rimIntersection->upperFilterDepth( 1.0 ) ) )
( m_rimIntersection->lowerFilterDepth( 1.0 ) >= m_rimIntersection->upperFilterDepth( 1.0 ) ) )
return;
bool useBufferObjects = true;