#5019 Use hex grid interface creation from data source for all intersections

This commit is contained in:
Jacob Støren
2019-11-12 17:22:46 +01:00
parent 612332cbbc
commit db0bbb96c4
4 changed files with 2 additions and 60 deletions

View File

@@ -64,7 +64,7 @@ RivIntersectionBoxPartMgr::RivIntersectionBoxPartMgr( RimIntersectionBox* inters
m_intersectionBoxFacesTextureCoords = new cvf::Vec2fArray;
cvf::ref<RivIntersectionHexGridInterface> hexGrid = createHexGridInterface();
cvf::ref<RivIntersectionHexGridInterface> hexGrid = intersectionBox->createHexGridInterface();
m_intersectionBoxGenerator = new RivIntersectionBoxGeometryGenerator( m_rimIntersectionBox, hexGrid.p() );
}
@@ -356,30 +356,3 @@ void RivIntersectionBoxPartMgr::appendMeshLinePartsToModel( cvf::ModelBasicList*
model->addPart( m_intersectionBoxGridLines.p() );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::ref<RivIntersectionHexGridInterface> RivIntersectionBoxPartMgr::createHexGridInterface()
{
RimEclipseView* eclipseView;
m_rimIntersectionBox->firstAncestorOrThisOfType( eclipseView );
if ( eclipseView )
{
RigMainGrid* grid = eclipseView->mainGrid();
return new RivEclipseIntersectionGrid( grid,
eclipseView->currentActiveCellInfo(),
m_rimIntersectionBox->isInactiveCellsVisible() );
}
RimGeoMechView* geoView;
m_rimIntersectionBox->firstAncestorOrThisOfType( geoView );
if ( geoView )
{
RigFemPart* femPart = geoView->femParts()->part( 0 );
return new RivFemIntersectionGrid( femPart );
}
return nullptr;
}