mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7739 Preparations : Expose reservoir cell IDs used to generate geometry
This commit is contained in:
parent
d132accd1d
commit
6e0dadbdaa
@ -215,3 +215,13 @@ void RivBoxIntersectionPartMgr::appendMeshLinePartsToModel( cvf::ModelBasicList*
|
||||
model->addPart( m_intersectionBoxGridLines.p() );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RivIntersectionGeometryGeneratorIF* RivBoxIntersectionPartMgr::intersectionGeometryGenerator() const
|
||||
{
|
||||
if ( m_intersectionBoxGenerator.notNull() ) return m_intersectionBoxGenerator.p();
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -60,6 +60,8 @@ public:
|
||||
void appendNativeIntersectionFacesToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
|
||||
void appendMeshLinePartsToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
|
||||
|
||||
const RivIntersectionGeometryGeneratorIF* intersectionGeometryGenerator() const;
|
||||
|
||||
private:
|
||||
void updatePartEffect();
|
||||
void generatePartGeometry();
|
||||
|
@ -712,3 +712,13 @@ cvf::Mat4d RivExtrudedCurveIntersectionPartMgr::unflattenTransformMatrix( const
|
||||
{
|
||||
return m_intersectionGenerator->unflattenTransformMatrix( intersectionPointFlat );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RivIntersectionGeometryGeneratorIF* RivExtrudedCurveIntersectionPartMgr::intersectionGeometryGenerator() const
|
||||
{
|
||||
if ( m_intersectionGenerator.notNull() ) return m_intersectionGenerator.p();
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -55,6 +55,7 @@ class RivExtrudedCurveIntersectionGeometryGenerator;
|
||||
class RivIntersectionHexGridInterface;
|
||||
class RivIntersectionVertexWeights;
|
||||
class RivPipeGeometryGenerator;
|
||||
class RivIntersectionGeometryGeneratorIF;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@ -79,6 +80,8 @@ public:
|
||||
|
||||
cvf::Mat4d unflattenTransformMatrix( const cvf::Vec3d& intersectionPointFlat ) const;
|
||||
|
||||
const RivIntersectionGeometryGeneratorIF* intersectionGeometryGenerator() const;
|
||||
|
||||
public:
|
||||
private:
|
||||
void generatePartGeometry();
|
||||
|
@ -264,6 +264,16 @@ QString RivSurfacePartMgr::resultInfoText( Rim3dView* view, uint hitPart, cvf::V
|
||||
return retval;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RivIntersectionGeometryGeneratorIF* RivSurfacePartMgr::intersectionGeometryGenerator() const
|
||||
{
|
||||
if ( m_intersectionGenerator.notNull() ) return m_intersectionGenerator.p();
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -36,6 +36,7 @@ class RigResultAccessor;
|
||||
class Rim3dView;
|
||||
|
||||
class RivSurfaceIntersectionGeometryGenerator;
|
||||
class RivIntersectionGeometryGeneratorIF;
|
||||
|
||||
class RivSurfacePartMgr : public cvf::Object
|
||||
{
|
||||
@ -50,6 +51,8 @@ public:
|
||||
|
||||
QString resultInfoText( Rim3dView* view, uint hitPart, cvf::Vec3d hitPoint );
|
||||
|
||||
const RivIntersectionGeometryGeneratorIF* intersectionGeometryGenerator() const;
|
||||
|
||||
private:
|
||||
void generatePartGeometry();
|
||||
|
||||
|
@ -48,6 +48,16 @@ void AppEnum<RimBoxIntersection::SinglePlaneState>::setUp()
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimBoxIntersection, "IntersectionBox" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RivIntersectionGeometryGeneratorIF* RimBoxIntersection::intersectionGeometryGenerator() const
|
||||
{
|
||||
if ( m_intersectionBoxPartMgr.notNull() ) return m_intersectionBoxPartMgr->intersectionGeometryGenerator();
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -78,6 +78,8 @@ public:
|
||||
void setToDefaultSizeBox();
|
||||
void setToDefaultSizeSlice( SinglePlaneState plane, const cvf::Vec3d& position );
|
||||
|
||||
const RivIntersectionGeometryGeneratorIF* intersectionGeometryGenerator() const override;
|
||||
|
||||
protected:
|
||||
caf::PdmFieldHandle* userDescriptionField() final;
|
||||
|
||||
|
@ -75,6 +75,16 @@ void caf::AppEnum<RimExtrudedCurveIntersection::CrossSectionDirEnum>::setUp()
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimExtrudedCurveIntersection, "CrossSection" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RivIntersectionGeometryGeneratorIF* RimExtrudedCurveIntersection::intersectionGeometryGenerator() const
|
||||
{
|
||||
if ( m_crossSectionPartMgr.notNull() ) return m_crossSectionPartMgr->intersectionGeometryGenerator();
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -90,6 +90,7 @@ public:
|
||||
Rim2dIntersectionView* correspondingIntersectionView();
|
||||
RivExtrudedCurveIntersectionPartMgr* intersectionPartMgr();
|
||||
void rebuildGeometry();
|
||||
const RivIntersectionGeometryGeneratorIF* intersectionGeometryGenerator() const override;
|
||||
|
||||
std::vector<cvf::Vec3d> polyLinesForExtrusionDirection() const;
|
||||
void appendPointToExtrusionDirection( const cvf::Vec3d& point );
|
||||
|
@ -27,6 +27,7 @@
|
||||
class RimIntersectionResultDefinition;
|
||||
class RivIntersectionHexGridInterface;
|
||||
class RimIntersectionResultsDefinitionCollection;
|
||||
class RivIntersectionGeometryGeneratorIF;
|
||||
|
||||
class RimIntersection : public caf::PdmObject
|
||||
{
|
||||
@ -45,6 +46,8 @@ public:
|
||||
RimIntersectionResultDefinition* activeSeparateResultDefinition();
|
||||
cvf::ref<RivIntersectionHexGridInterface> createHexGridInterface();
|
||||
|
||||
virtual const RivIntersectionGeometryGeneratorIF* intersectionGeometryGenerator() const = 0;
|
||||
|
||||
protected:
|
||||
virtual RimIntersectionResultsDefinitionCollection* findSeparateResultsCollection();
|
||||
|
||||
|
@ -141,6 +141,16 @@ RivSurfacePartMgr* RimSurfaceInView::surfacePartMgr()
|
||||
return m_surfacePartMgr.p();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RivIntersectionGeometryGeneratorIF* RimSurfaceInView::intersectionGeometryGenerator() const
|
||||
{
|
||||
if ( m_surfacePartMgr.notNull() ) return m_surfacePartMgr->intersectionGeometryGenerator();
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -53,6 +53,7 @@ public:
|
||||
|
||||
void clearGeometry();
|
||||
RivSurfacePartMgr* surfacePartMgr();
|
||||
const RivIntersectionGeometryGeneratorIF* intersectionGeometryGenerator() const override;
|
||||
|
||||
void loadDataAndUpdate();
|
||||
|
||||
|
@ -483,3 +483,29 @@ std::vector<RimRegularLegendConfig*> RimSurfaceInViewCollection::legendConfigs()
|
||||
|
||||
return configs;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<const RivIntersectionGeometryGeneratorIF*> RimSurfaceInViewCollection::intersectionGeometryGenerators() const
|
||||
{
|
||||
std::vector<const RivIntersectionGeometryGeneratorIF*> generators;
|
||||
|
||||
for ( auto surf : m_surfacesInView )
|
||||
{
|
||||
if ( surf->isActive() && surf->isNativeSurfaceResultsActive() )
|
||||
{
|
||||
auto generator = surf->intersectionGeometryGenerator();
|
||||
|
||||
if ( generator ) generators.push_back( generator );
|
||||
}
|
||||
}
|
||||
|
||||
for ( auto child : m_collectionsInView )
|
||||
{
|
||||
auto childGenerators = child->intersectionGeometryGenerators();
|
||||
generators.insert( generators.end(), childGenerators.begin(), childGenerators.end() );
|
||||
}
|
||||
|
||||
return generators;
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ class RimSurface;
|
||||
class RimSurfaceCollection;
|
||||
class RimRegularLegendConfig;
|
||||
class RiuViewer;
|
||||
class RivIntersectionGeometryGeneratorIF;
|
||||
|
||||
class RimSurfaceInViewCollection : public RimCheckableNamedObject
|
||||
{
|
||||
@ -64,6 +65,8 @@ public:
|
||||
|
||||
std::vector<RimRegularLegendConfig*> legendConfigs();
|
||||
|
||||
std::vector<const RivIntersectionGeometryGeneratorIF*> intersectionGeometryGenerators() const;
|
||||
|
||||
protected:
|
||||
void initAfterRead() override;
|
||||
caf::PdmFieldHandle* userDescriptionField() override;
|
||||
|
Loading…
Reference in New Issue
Block a user