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:
@@ -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;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -51,8 +51,9 @@ public:
|
||||
bool isNativeSurfaceResultsActive() const;
|
||||
RimSurfaceResultDefinition* surfaceResultDefinition();
|
||||
|
||||
void clearGeometry();
|
||||
RivSurfacePartMgr* surfacePartMgr();
|
||||
void clearGeometry();
|
||||
RivSurfacePartMgr* surfacePartMgr();
|
||||
const RivIntersectionGeometryGeneratorIF* intersectionGeometryGenerator() const override;
|
||||
|
||||
void loadDataAndUpdate();
|
||||
|
||||
@@ -66,7 +67,7 @@ private:
|
||||
|
||||
caf::PdmFieldHandle* userDescriptionField() override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
|
||||
caf::PdmProxyValueField<QString> m_name;
|
||||
caf::PdmPtrField<RimSurface*> m_surface;
|
||||
|
||||
@@ -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,8 +65,10 @@ public:
|
||||
|
||||
std::vector<RimRegularLegendConfig*> legendConfigs();
|
||||
|
||||
std::vector<const RivIntersectionGeometryGeneratorIF*> intersectionGeometryGenerators() const;
|
||||
|
||||
protected:
|
||||
void initAfterRead() override;
|
||||
void initAfterRead() override;
|
||||
caf::PdmFieldHandle* userDescriptionField() override;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user