Merge pull request #5438 from OPM/feature-surface-intersection-improvements

Feature surface intersection improvements
This commit is contained in:
Magne Sjaastad
2020-01-30 14:41:52 +01:00
committed by GitHub
6 changed files with 440 additions and 50 deletions

View File

@@ -190,11 +190,12 @@ void RivSurfaceIntersectionGeometryGenerator::calculateArrays()
m_hexGrid->cellCornerIndices( globalCellIdx, &cornerIndices[0] );
hexPlaneCutTriangleVxes.clear();
int triangleCount = caf::HexGridIntersectionTools::planeHexIntersectionMC( plane,
&cellCorners[0],
&cornerIndices[0],
&hexPlaneCutTriangleVxes,
&cellFaceForEachTriangleEdge );
cellFaceForEachTriangleEdge.clear();
int triangleCount = caf::HexGridIntersectionTools::planeHexIntersectionMCTet( plane,
&cellCorners[0],
&cornerIndices[0],
&hexPlaneCutTriangleVxes,
&cellFaceForEachTriangleEdge );
if ( triangleCount == 0 ) continue;

View File

@@ -243,7 +243,8 @@ void RivSurfacePartMgr::applySingleColor()
caf::SurfaceEffectGenerator surfaceGen( cvf::Color4f( m_surfaceInView->surface()->color() ), caf::PO_1 );
cvf::ref<cvf::Effect> eff = surfaceGen.generateCachedEffect();
caf::SurfaceEffectGenerator surfaceGenBehind( cvf::Color4f( m_surfaceInView->surface()->color() ), caf::PO_2 );
caf::SurfaceEffectGenerator surfaceGenBehind( cvf::Color4f( m_surfaceInView->surface()->color() ),
caf::PO_POS_LARGE );
cvf::ref<cvf::Effect> effBehind = surfaceGenBehind.generateCachedEffect();
if ( m_nativeTrianglesPart.notNull() )
@@ -301,7 +302,7 @@ void RivSurfacePartMgr::generatePartGeometry()
}
cvf::ref<cvf::Part> part = new cvf::Part;
part->setName( "Reservoir Surface" );
part->setName( "Intersected Reservoir Surface" );
part->setDrawable( geo.p() );
// Set mapping from triangle face index to cell index