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() );
|
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 appendNativeIntersectionFacesToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
|
||||||
void appendMeshLinePartsToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
|
void appendMeshLinePartsToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
|
||||||
|
|
||||||
|
const RivIntersectionGeometryGeneratorIF* intersectionGeometryGenerator() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updatePartEffect();
|
void updatePartEffect();
|
||||||
void generatePartGeometry();
|
void generatePartGeometry();
|
||||||
|
@ -712,3 +712,13 @@ cvf::Mat4d RivExtrudedCurveIntersectionPartMgr::unflattenTransformMatrix( const
|
|||||||
{
|
{
|
||||||
return m_intersectionGenerator->unflattenTransformMatrix( intersectionPointFlat );
|
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 RivIntersectionHexGridInterface;
|
||||||
class RivIntersectionVertexWeights;
|
class RivIntersectionVertexWeights;
|
||||||
class RivPipeGeometryGenerator;
|
class RivPipeGeometryGenerator;
|
||||||
|
class RivIntersectionGeometryGeneratorIF;
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
@ -79,6 +80,8 @@ public:
|
|||||||
|
|
||||||
cvf::Mat4d unflattenTransformMatrix( const cvf::Vec3d& intersectionPointFlat ) const;
|
cvf::Mat4d unflattenTransformMatrix( const cvf::Vec3d& intersectionPointFlat ) const;
|
||||||
|
|
||||||
|
const RivIntersectionGeometryGeneratorIF* intersectionGeometryGenerator() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
private:
|
private:
|
||||||
void generatePartGeometry();
|
void generatePartGeometry();
|
||||||
|
@ -264,6 +264,16 @@ QString RivSurfacePartMgr::resultInfoText( Rim3dView* view, uint hitPart, cvf::V
|
|||||||
return retval;
|
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 Rim3dView;
|
||||||
|
|
||||||
class RivSurfaceIntersectionGeometryGenerator;
|
class RivSurfaceIntersectionGeometryGenerator;
|
||||||
|
class RivIntersectionGeometryGeneratorIF;
|
||||||
|
|
||||||
class RivSurfacePartMgr : public cvf::Object
|
class RivSurfacePartMgr : public cvf::Object
|
||||||
{
|
{
|
||||||
@ -50,6 +51,8 @@ public:
|
|||||||
|
|
||||||
QString resultInfoText( Rim3dView* view, uint hitPart, cvf::Vec3d hitPoint );
|
QString resultInfoText( Rim3dView* view, uint hitPart, cvf::Vec3d hitPoint );
|
||||||
|
|
||||||
|
const RivIntersectionGeometryGeneratorIF* intersectionGeometryGenerator() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void generatePartGeometry();
|
void generatePartGeometry();
|
||||||
|
|
||||||
|
@ -48,6 +48,16 @@ void AppEnum<RimBoxIntersection::SinglePlaneState>::setUp()
|
|||||||
|
|
||||||
CAF_PDM_SOURCE_INIT( RimBoxIntersection, "IntersectionBox" );
|
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 setToDefaultSizeBox();
|
||||||
void setToDefaultSizeSlice( SinglePlaneState plane, const cvf::Vec3d& position );
|
void setToDefaultSizeSlice( SinglePlaneState plane, const cvf::Vec3d& position );
|
||||||
|
|
||||||
|
const RivIntersectionGeometryGeneratorIF* intersectionGeometryGenerator() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
caf::PdmFieldHandle* userDescriptionField() final;
|
caf::PdmFieldHandle* userDescriptionField() final;
|
||||||
|
|
||||||
|
@ -75,6 +75,16 @@ void caf::AppEnum<RimExtrudedCurveIntersection::CrossSectionDirEnum>::setUp()
|
|||||||
|
|
||||||
CAF_PDM_SOURCE_INIT( RimExtrudedCurveIntersection, "CrossSection" );
|
CAF_PDM_SOURCE_INIT( RimExtrudedCurveIntersection, "CrossSection" );
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
const RivIntersectionGeometryGeneratorIF* RimExtrudedCurveIntersection::intersectionGeometryGenerator() const
|
||||||
|
{
|
||||||
|
if ( m_crossSectionPartMgr.notNull() ) return m_crossSectionPartMgr->intersectionGeometryGenerator();
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -87,9 +87,10 @@ public:
|
|||||||
std::vector<std::vector<cvf::Vec3d>> polyLines( cvf::Vec3d* flattenedPolylineStartPoint = nullptr ) const;
|
std::vector<std::vector<cvf::Vec3d>> polyLines( cvf::Vec3d* flattenedPolylineStartPoint = nullptr ) const;
|
||||||
void appendPointToPolyLine( const cvf::Vec3d& point );
|
void appendPointToPolyLine( const cvf::Vec3d& point );
|
||||||
|
|
||||||
Rim2dIntersectionView* correspondingIntersectionView();
|
Rim2dIntersectionView* correspondingIntersectionView();
|
||||||
RivExtrudedCurveIntersectionPartMgr* intersectionPartMgr();
|
RivExtrudedCurveIntersectionPartMgr* intersectionPartMgr();
|
||||||
void rebuildGeometry();
|
void rebuildGeometry();
|
||||||
|
const RivIntersectionGeometryGeneratorIF* intersectionGeometryGenerator() const override;
|
||||||
|
|
||||||
std::vector<cvf::Vec3d> polyLinesForExtrusionDirection() const;
|
std::vector<cvf::Vec3d> polyLinesForExtrusionDirection() const;
|
||||||
void appendPointToExtrusionDirection( const cvf::Vec3d& point );
|
void appendPointToExtrusionDirection( const cvf::Vec3d& point );
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
class RimIntersectionResultDefinition;
|
class RimIntersectionResultDefinition;
|
||||||
class RivIntersectionHexGridInterface;
|
class RivIntersectionHexGridInterface;
|
||||||
class RimIntersectionResultsDefinitionCollection;
|
class RimIntersectionResultsDefinitionCollection;
|
||||||
|
class RivIntersectionGeometryGeneratorIF;
|
||||||
|
|
||||||
class RimIntersection : public caf::PdmObject
|
class RimIntersection : public caf::PdmObject
|
||||||
{
|
{
|
||||||
@ -45,6 +46,8 @@ public:
|
|||||||
RimIntersectionResultDefinition* activeSeparateResultDefinition();
|
RimIntersectionResultDefinition* activeSeparateResultDefinition();
|
||||||
cvf::ref<RivIntersectionHexGridInterface> createHexGridInterface();
|
cvf::ref<RivIntersectionHexGridInterface> createHexGridInterface();
|
||||||
|
|
||||||
|
virtual const RivIntersectionGeometryGeneratorIF* intersectionGeometryGenerator() const = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual RimIntersectionResultsDefinitionCollection* findSeparateResultsCollection();
|
virtual RimIntersectionResultsDefinitionCollection* findSeparateResultsCollection();
|
||||||
|
|
||||||
|
@ -141,6 +141,16 @@ RivSurfacePartMgr* RimSurfaceInView::surfacePartMgr()
|
|||||||
return m_surfacePartMgr.p();
|
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;
|
bool isNativeSurfaceResultsActive() const;
|
||||||
RimSurfaceResultDefinition* surfaceResultDefinition();
|
RimSurfaceResultDefinition* surfaceResultDefinition();
|
||||||
|
|
||||||
void clearGeometry();
|
void clearGeometry();
|
||||||
RivSurfacePartMgr* surfacePartMgr();
|
RivSurfacePartMgr* surfacePartMgr();
|
||||||
|
const RivIntersectionGeometryGeneratorIF* intersectionGeometryGenerator() const override;
|
||||||
|
|
||||||
void loadDataAndUpdate();
|
void loadDataAndUpdate();
|
||||||
|
|
||||||
@ -66,7 +67,7 @@ private:
|
|||||||
|
|
||||||
caf::PdmFieldHandle* userDescriptionField() override;
|
caf::PdmFieldHandle* userDescriptionField() override;
|
||||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) 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::PdmProxyValueField<QString> m_name;
|
||||||
caf::PdmPtrField<RimSurface*> m_surface;
|
caf::PdmPtrField<RimSurface*> m_surface;
|
||||||
|
@ -483,3 +483,29 @@ std::vector<RimRegularLegendConfig*> RimSurfaceInViewCollection::legendConfigs()
|
|||||||
|
|
||||||
return configs;
|
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 RimSurfaceCollection;
|
||||||
class RimRegularLegendConfig;
|
class RimRegularLegendConfig;
|
||||||
class RiuViewer;
|
class RiuViewer;
|
||||||
|
class RivIntersectionGeometryGeneratorIF;
|
||||||
|
|
||||||
class RimSurfaceInViewCollection : public RimCheckableNamedObject
|
class RimSurfaceInViewCollection : public RimCheckableNamedObject
|
||||||
{
|
{
|
||||||
@ -64,8 +65,10 @@ public:
|
|||||||
|
|
||||||
std::vector<RimRegularLegendConfig*> legendConfigs();
|
std::vector<RimRegularLegendConfig*> legendConfigs();
|
||||||
|
|
||||||
|
std::vector<const RivIntersectionGeometryGeneratorIF*> intersectionGeometryGenerators() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void initAfterRead() override;
|
void initAfterRead() override;
|
||||||
caf::PdmFieldHandle* userDescriptionField() override;
|
caf::PdmFieldHandle* userDescriptionField() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user