#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;
}

View File

@ -55,8 +55,6 @@ private:
void updatePartEffect();
void generatePartGeometry();
cvf::ref<RivIntersectionHexGridInterface> createHexGridInterface();
private:
RimIntersectionBox* m_rimIntersectionBox;

View File

@ -97,7 +97,7 @@ RivIntersectionPartMgr::RivIntersectionPartMgr( RimIntersection* rimCrossSection
if ( polyLines.size() > 0 )
{
cvf::Vec3d direction = m_rimCrossSection->extrusionDirection();
cvf::ref<RivIntersectionHexGridInterface> hexGrid = createHexGridInterface();
cvf::ref<RivIntersectionHexGridInterface> hexGrid = m_rimCrossSection->createHexGridInterface();
m_crossSectionGenerator = new RivIntersectionGeometryGenerator( m_rimCrossSection,
polyLines,
direction,
@ -998,30 +998,3 @@ cvf::Mat4d RivIntersectionPartMgr::unflattenTransformMatrix( const cvf::Vec3d& i
{
return m_crossSectionGenerator->unflattenTransformMatrix( intersectionPointFlat );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::ref<RivIntersectionHexGridInterface> RivIntersectionPartMgr::createHexGridInterface()
{
RimEclipseView* eclipseView;
m_rimCrossSection->firstAncestorOrThisOfType( eclipseView );
if ( eclipseView )
{
RigMainGrid* grid = eclipseView->mainGrid();
return new RivEclipseIntersectionGrid( grid,
eclipseView->currentActiveCellInfo(),
m_rimCrossSection->isInactiveCellsVisible() );
}
RimGeoMechView* geoView;
m_rimCrossSection->firstAncestorOrThisOfType( geoView );
if ( geoView && geoView->femParts() && geoView->femParts()->partCount() )
{
RigFemPart* femPart = geoView->femParts()->part( 0 );
return new RivFemIntersectionGrid( femPart );
}
return nullptr;
}

View File

@ -117,8 +117,6 @@ private:
void createPolyLineParts( bool useBufferObjects );
void createExtrusionDirParts( bool useBufferObjects );
cvf::ref<RivIntersectionHexGridInterface> createHexGridInterface();
private:
caf::PdmPointer<RimIntersection> m_rimCrossSection;