diff --git a/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilter3dviewFeature.cpp b/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilter3dviewFeature.cpp index 1c1c6b1082..f63228b1be 100644 --- a/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilter3dviewFeature.cpp +++ b/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilter3dviewFeature.cpp @@ -21,6 +21,8 @@ #include "Polygons/RimPolygonInView.h" #include "RiaApplication.h" +#include "RicNewPolygonFilterFeature.h" + #include "RimCase.h" #include "RimCellFilterCollection.h" #include "RimGridView.h" @@ -39,20 +41,13 @@ CAF_CMD_SOURCE_INIT( RicNewPolygonFilter3dviewFeature, "RicNewPolygonFilter3dvie //-------------------------------------------------------------------------------------------------- void RicNewPolygonFilter3dviewFeature::onActionTriggered( bool isChecked ) { - // Get the selected Cell Filter Collection RimGridView* viewOrComparisonView = RiaApplication::instance()->activeMainOrComparisonGridView(); if ( !viewOrComparisonView ) return; - RimCellFilterCollection* filtColl = viewOrComparisonView->cellFilterCollection(); - - // and the case to use - RimCase* sourceCase = viewOrComparisonView->ownerCase(); + RimCellFilterCollection* filtColl = viewOrComparisonView->cellFilterCollection(); + RimCase* sourceCase = viewOrComparisonView->ownerCase(); - RimPolygonFilter* lastCreatedOrUpdated = filtColl->addNewPolygonFilter( sourceCase ); - if ( lastCreatedOrUpdated ) - { - Riu3DMainWindowTools::selectAsCurrentItem( lastCreatedOrUpdated->polygonEditor() ); - } + RicNewPolygonFilterFeature::appendNewPolygonFilter( sourceCase, filtColl ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilterFeature.cpp b/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilterFeature.cpp index 3c40d0dfc8..8b6da6c77d 100644 --- a/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilterFeature.cpp +++ b/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilterFeature.cpp @@ -19,6 +19,7 @@ #include "RicNewPolygonFilterFeature.h" #include "Polygons/RimPolygonInView.h" +#include "Polygons/RimPolygonTools.h" #include "RimCase.h" #include "RimCellFilterCollection.h" @@ -33,24 +34,41 @@ CAF_CMD_SOURCE_INIT( RicNewPolygonFilterFeature, "RicNewPolygonFilterFeature" ); +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimPolygonFilter* RicNewPolygonFilterFeature::appendNewPolygonFilter( RimCase* sourceCase, RimCellFilterCollection* cellFilterCollection ) +{ + if ( !sourceCase || !cellFilterCollection ) + { + return nullptr; + } + + RimPolygonFilter* polygonFilter = cellFilterCollection->addNewPolygonFilter( sourceCase ); + if ( polygonFilter ) + { + auto polygon = RimPolygonTools::createNewPolygon(); + polygonFilter->setPolygon( polygon ); + + RimPolygonTools::selectPolygonInView( polygon, polygonFilter ); + return polygonFilter; + } + + return nullptr; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RicNewPolygonFilterFeature::onActionTriggered( bool isChecked ) { - // Find the selected Cell Filter Collection std::vector colls = caf::selectedObjectsByTypeStrict(); if ( colls.empty() ) return; RimCellFilterCollection* filtColl = colls[0]; - // and the case to use RimCase* sourceCase = filtColl->firstAncestorOrThisOfTypeAsserted(); - RimPolygonFilter* lastCreatedOrUpdated = filtColl->addNewPolygonFilter( sourceCase ); - if ( lastCreatedOrUpdated ) - { - Riu3DMainWindowTools::selectAsCurrentItem( lastCreatedOrUpdated->polygonEditor() ); - } + appendNewPolygonFilter( sourceCase, filtColl ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilterFeature.h b/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilterFeature.h index 570408e305..0dae4c9824 100644 --- a/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilterFeature.h +++ b/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilterFeature.h @@ -20,6 +20,10 @@ #include "cafCmdFeature.h" +class RimCellFilterCollection; +class RimCase; +class RimPolygonFilter; + //================================================================================================== /// //================================================================================================== @@ -27,6 +31,9 @@ class RicNewPolygonFilterFeature : public caf::CmdFeature { CAF_CMD_HEADER_INIT; +public: + static RimPolygonFilter* appendNewPolygonFilter( RimCase* sourceCase, RimCellFilterCollection* cellFilterCollection ); + protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/ModelVisualization/RivCellFilterPartMgr.cpp b/ApplicationLibCode/ModelVisualization/RivCellFilterPartMgr.cpp index 3e16517cd8..1695c05eac 100644 --- a/ApplicationLibCode/ModelVisualization/RivCellFilterPartMgr.cpp +++ b/ApplicationLibCode/ModelVisualization/RivCellFilterPartMgr.cpp @@ -39,16 +39,19 @@ void RivCellFilterPartMgr::appendGeometryPartsToModel( cvf::ModelBasicList* const caf::DisplayCoordTransform* displayCoordTransform, const cvf::BoundingBox& boundingBox ) { - std::vector colls = m_rimView->descendantsIncludingThisOfType(); + return; + /* + std::vector colls = m_rimView->descendantsIncludingThisOfType(); - if ( colls.empty() ) return; - auto coll = colls.front(); + if ( colls.empty() ) return; + auto coll = colls.front(); - for ( auto filter : coll->filters() ) - { - if ( auto polyFilter = dynamic_cast( filter ) ) + for ( auto filter : coll->filters() ) { - polyFilter->appendPartsToModel( model, displayCoordTransform, boundingBox ); + if ( auto polyFilter = dynamic_cast( filter ) ) + { + polyFilter->appendPartsToModel( model, displayCoordTransform, boundingBox ); + } } - } + */ } diff --git a/ApplicationLibCode/ProjectDataModel/CellFilters/RimCellFilterCollection.cpp b/ApplicationLibCode/ProjectDataModel/CellFilters/RimCellFilterCollection.cpp index 0ffae32dba..654a8b6906 100644 --- a/ApplicationLibCode/ProjectDataModel/CellFilters/RimCellFilterCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/CellFilters/RimCellFilterCollection.cpp @@ -260,8 +260,6 @@ RimPolygonFilter* RimCellFilterCollection::addNewPolygonFilter( RimCase* srcCase RimPolygonFilter* pFilter = new RimPolygonFilter(); pFilter->setCase( srcCase ); addFilter( pFilter ); - pFilter->configurePolygonEditor(); - pFilter->enablePicking( true ); onFilterUpdated( pFilter ); return pFilter; } diff --git a/ApplicationLibCode/ProjectDataModel/CellFilters/RimPolygonFilter.cpp b/ApplicationLibCode/ProjectDataModel/CellFilters/RimPolygonFilter.cpp index bc57049cb8..8a7fd29af7 100644 --- a/ApplicationLibCode/ProjectDataModel/CellFilters/RimPolygonFilter.cpp +++ b/ApplicationLibCode/ProjectDataModel/CellFilters/RimPolygonFilter.cpp @@ -28,9 +28,10 @@ #include "Polygons/RimPolygon.h" #include "Polygons/RimPolygonInView.h" +#include "Polygons/RimPolygonTools.h" + #include "RimEclipseCase.h" #include "RimGeoMechCase.h" -#include "RimPolylineTarget.h" #include "RimTools.h" #include "Riu3DMainWindowTools.h" @@ -76,22 +77,12 @@ RimPolygonFilter::RimPolygonFilter() CAF_PDM_InitFieldNoDefault( &m_polyIncludeType, "PolyIncludeType", "Cells to include" ); - CAF_PDM_InitFieldNoDefault( &m_internalPolygon, "InternalPolygon", "Polygon For Filter" ); - m_internalPolygon = new RimPolygon; - m_internalPolygon->setName( "Polygon For Filter" ); - m_internalPolygon->uiCapability()->setUiTreeHidden( true ); - - CAF_PDM_InitFieldNoDefault( &m_cellFilterPolygon, "Polygon", "Polygon" ); - m_cellFilterPolygon = m_internalPolygon; - - CAF_PDM_InitFieldNoDefault( &m_polygonEditor, "PolygonEditor", "Polygon Editor" ); - m_polygonEditor = new RimPolygonInView; - CAF_PDM_InitField( &m_enableFiltering, "EnableFiltering", false, "Enable Filter" ); CAF_PDM_InitField( &m_enableKFilter, "EnableKFilter", false, "Enable K Range Filter" ); CAF_PDM_InitFieldNoDefault( &m_kFilterStr, "KRangeFilter", "K Range Filter", "", "Example: 2,4-6,10-20:2", "" ); + CAF_PDM_InitFieldNoDefault( &m_cellFilterPolygon, "Polygon", "Polygon" ); CAF_PDM_InitField( &m_editPolygonButton, "EditPolygonButton", false, "Edit" ); m_editPolygonButton.uiCapability()->setUiEditorTypeName( caf::PdmUiPushButtonEditor::uiEditorTypeName() ); m_editPolygonButton.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN ); @@ -118,6 +109,15 @@ void RimPolygonFilter::enableKFilter( bool bEnable ) m_enableKFilter = bEnable; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimPolygonFilter::setPolygon( RimPolygon* polygon ) +{ + setPolygonAndConnectSignals( polygon ); + updateCells(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -149,8 +149,6 @@ QString RimPolygonFilter::fullName() const void RimPolygonFilter::initAfterRead() { RimCellFilter::initAfterRead(); - - configurePolygonEditor(); } //-------------------------------------------------------------------------------------------------- @@ -175,15 +173,11 @@ void RimPolygonFilter::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin uiOrdering.add( &m_name ); auto group = uiOrdering.addNewGroup( "General" ); + group->add( &m_cellFilterPolygon ); + group->add( &m_editPolygonButton, { .newRow = false } ); group->add( &m_filterMode ); group->add( &m_enableFiltering ); - uiOrdering.add( &m_cellFilterPolygon ); - if ( m_cellFilterPolygon() != m_internalPolygon() ) - { - uiOrdering.add( &m_editPolygonButton, { .newRow = false } ); - } - auto group1 = uiOrdering.addNewGroup( "Polygon Selection" ); group1->add( &m_polyFilterMode ); @@ -221,23 +215,6 @@ void RimPolygonFilter::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin } } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimPolygonFilter::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= "" */ ) -{ - RimCellFilter::defineUiTreeOrdering( uiTreeOrdering, uiConfigName ); - - bool showPolygonEditor = ( m_cellFilterPolygon() == m_internalPolygon() ); - - if ( showPolygonEditor ) - { - uiTreeOrdering.add( m_polygonEditor() ); - } - - uiTreeOrdering.skipRemainingChildren(); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -247,13 +224,6 @@ QList RimPolygonFilter::calculateValueOptions( const caf if ( fieldNeedingOptions == &m_cellFilterPolygon ) { RimTools::polygonOptionItems( &options ); - if ( !options.empty() ) - { - options.push_front( caf::PdmOptionItemInfo( "Project Polygons", nullptr ) ); - } - - options.push_front( - caf::PdmOptionItemInfo( m_internalPolygon()->name(), m_internalPolygon(), false, m_internalPolygon->uiIconProvider() ) ); } return options; @@ -266,7 +236,7 @@ void RimPolygonFilter::fieldChangedByUi( const caf::PdmFieldHandle* changedField { if ( changedField == &m_editPolygonButton ) { - if ( m_cellFilterPolygon() ) Riu3DMainWindowTools::selectAsCurrentItem( m_cellFilterPolygon() ); + RimPolygonTools::selectPolygonInView( m_cellFilterPolygon(), this ); m_editPolygonButton = false; @@ -275,7 +245,7 @@ void RimPolygonFilter::fieldChangedByUi( const caf::PdmFieldHandle* changedField if ( changedField == &m_cellFilterPolygon ) { - configurePolygonEditor(); + setPolygonAndConnectSignals( m_cellFilterPolygon() ); updateAllRequiredEditors(); } @@ -287,15 +257,6 @@ void RimPolygonFilter::fieldChangedByUi( const caf::PdmFieldHandle* changedField } } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimPolygonFilter::enablePicking( bool enable ) -{ - m_polygonEditor->enablePicking( enable ); - updateConnectedEditors(); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -698,9 +659,9 @@ void RimPolygonFilter::updateCells() // get polyline as vector std::vector points; - for ( auto target : m_polygonEditor->activeTargets() ) + if ( m_cellFilterPolygon() ) { - points.push_back( target->targetPointXYZ() ); + points = m_cellFilterPolygon->pointsInDomainCoords(); } // We need at least three points to make a closed polygon, or just 2 for a polyline @@ -722,36 +683,6 @@ void RimPolygonFilter::updateCells() } } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimPolygonFilter::configurePolygonEditor() -{ - m_polygonEditor->setPolygon( m_cellFilterPolygon() ); - - // Must connect the signals after polygon is assigned to the polygon editor - // When assigning an object to a ptr field, all signals are disconnected - connectObjectSignals( m_cellFilterPolygon() ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimPolygonFilter::appendPartsToModel( cvf::ModelBasicList* model, - const caf::DisplayCoordTransform* scaleTransform, - const cvf::BoundingBox& boundingBox ) -{ - return m_polygonEditor->appendPartsToModel( model, scaleTransform, boundingBox ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimPolygonInView* RimPolygonFilter::polygonEditor() const -{ - return m_polygonEditor(); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -771,7 +702,7 @@ void RimPolygonFilter::initializeCellList() //-------------------------------------------------------------------------------------------------- bool RimPolygonFilter::isPolygonClosed() const { - if ( m_polygonEditor->polygon() ) return m_polygonEditor->polygon()->isClosed(); + if ( m_cellFilterPolygon() ) return m_cellFilterPolygon->isClosed(); return false; } @@ -779,7 +710,7 @@ bool RimPolygonFilter::isPolygonClosed() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimPolygonFilter::connectObjectSignals( RimPolygon* polygon ) +void RimPolygonFilter::setPolygonAndConnectSignals( RimPolygon* polygon ) { if ( m_cellFilterPolygon() ) { diff --git a/ApplicationLibCode/ProjectDataModel/CellFilters/RimPolygonFilter.h b/ApplicationLibCode/ProjectDataModel/CellFilters/RimPolygonFilter.h index 6432c2adfe..704bb437d5 100644 --- a/ApplicationLibCode/ProjectDataModel/CellFilters/RimPolygonFilter.h +++ b/ApplicationLibCode/ProjectDataModel/CellFilters/RimPolygonFilter.h @@ -22,14 +22,12 @@ #include "RimCellFilterIntervalTool.h" #include "cafAppEnum.h" -#include "cafPdmChildField.h" #include "cafPdmObject.h" #include "cafPdmPtrField.h" class RimPolygon; class RigGridBase; class RigFemPartGrid; -class RimPolygonInView; class RigEclipseCaseData; namespace cvf @@ -71,22 +69,15 @@ class RimPolygonFilter : public RimCellFilter void enableFilter( bool bEnable ); void enableKFilter( bool bEnable ); + void setPolygon( RimPolygon* polygon ); bool isFilterEnabled() const override; - void enablePicking( bool enable ); - void updateCellIndexFilter( cvf::UByteArray* includeVisibility, cvf::UByteArray* excludeVisibility, int gridIndex ) override; void onGridChanged() override; - void configurePolygonEditor(); - void appendPartsToModel( cvf::ModelBasicList* model, const caf::DisplayCoordTransform* scaleTransform, const cvf::BoundingBox& boundingBox ); - - RimPolygonInView* polygonEditor() const; - protected: void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; - void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override; QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; void initAfterRead() override; void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; @@ -111,7 +102,7 @@ class RimPolygonFilter : public RimCellFilter bool isPolygonClosed() const; - void connectObjectSignals( RimPolygon* polygon ); + void setPolygonAndConnectSignals( RimPolygon* polygon ); void onObjectChanged( const caf::SignalEmitter* emitter ); private: @@ -121,13 +112,10 @@ class RimPolygonFilter : public RimCellFilter caf::PdmField m_enableKFilter; caf::PdmField m_kFilterStr; + caf::PdmPtrField m_cellFilterPolygon; + caf::PdmField m_editPolygonButton; + std::vector> m_cells; RimCellFilterIntervalTool m_intervalTool; - - // Local polygon and polygon editor - caf::PdmPtrField m_cellFilterPolygon; - caf::PdmChildField m_internalPolygon; - caf::PdmChildField m_polygonEditor; - caf::PdmField m_editPolygonButton; }; diff --git a/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonTools.cpp b/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonTools.cpp index fde7dc13f0..cc010aa3fd 100644 --- a/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonTools.cpp +++ b/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonTools.cpp @@ -19,9 +19,13 @@ #include "RimPolygonTools.h" #include "RimGridView.h" +#include "RimOilField.h" +#include "RimPolygon.h" +#include "RimPolygonCollection.h" +#include "RimPolygonFilter.h" #include "RimPolygonInView.h" #include "RimPolygonInViewCollection.h" - +#include "RimProject.h" #include "Riu3DMainWindowTools.h" //-------------------------------------------------------------------------------------------------- @@ -37,6 +41,7 @@ void RimPolygonTools::selectPolygonInView( RimPolygon* polygon, caf::PdmObject* { if ( polygonInView && polygonInView->polygon() == polygon ) { + polygonInView->enablePicking( true ); Riu3DMainWindowTools::selectAsCurrentItem( polygonInView ); return; @@ -44,3 +49,17 @@ void RimPolygonTools::selectPolygonInView( RimPolygon* polygon, caf::PdmObject* } } } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimPolygon* RimPolygonTools::createNewPolygon() +{ + auto proj = RimProject::current(); + auto polygonCollection = proj->activeOilField()->polygonCollection(); + + auto newPolygon = polygonCollection->appendUserDefinedPolygon(); + polygonCollection->uiCapability()->updateAllRequiredEditors(); + + return newPolygon; +} diff --git a/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonTools.h b/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonTools.h index e6f3ff1104..2c1397ba7c 100644 --- a/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonTools.h +++ b/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonTools.h @@ -28,5 +28,6 @@ class PdmObject; class RimPolygonTools { public: - static void selectPolygonInView( RimPolygon* polygon, caf::PdmObject* sourceObject ); + static void selectPolygonInView( RimPolygon* polygon, caf::PdmObject* sourceObject ); + static RimPolygon* createNewPolygon(); }; diff --git a/ApplicationLibCode/ProjectDataModel/Rim3dView.cpp b/ApplicationLibCode/ProjectDataModel/Rim3dView.cpp index eaba599751..dd450bd55a 100644 --- a/ApplicationLibCode/ProjectDataModel/Rim3dView.cpp +++ b/ApplicationLibCode/ProjectDataModel/Rim3dView.cpp @@ -51,7 +51,6 @@ #include "RimWellPathCollection.h" #include "RivAnnotationsPartMgr.h" -#include "RivCellFilterPartMgr.h" #include "RivMeasurementPartMgr.h" #include "RivWellPathsPartMgr.h" @@ -174,7 +173,6 @@ Rim3dView::Rim3dView() m_wellPathsPartManager = new RivWellPathsPartMgr( this ); m_annotationsPartManager = new RivAnnotationsPartMgr( this ); - m_cellfilterPartManager = new RivCellFilterPartMgr( this ); m_measurementPartManager = new RivMeasurementPartMgr( this ); this->setAs3DViewMdiWindow(); @@ -701,14 +699,12 @@ void Rim3dView::updateDisplayModelForCurrentTimeStepAndRedraw() this->onUpdateDisplayModelForCurrentTimeStep(); appendAnnotationsToModel(); appendMeasurementToModel(); - appendCellFiltersToModel(); if ( Rim3dView* depView = prepareComparisonView() ) { depView->onUpdateDisplayModelForCurrentTimeStep(); depView->appendAnnotationsToModel(); depView->appendMeasurementToModel(); - depView->appendCellFiltersToModel(); restoreComparisonView(); } @@ -1133,19 +1129,6 @@ void Rim3dView::addAnnotationsToModel( cvf::ModelBasicList* annotationsModel ) annotationsModel->updateBoundingBoxesRecursive(); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void Rim3dView::addCellFiltersToModel( cvf::ModelBasicList* cellFilterModel ) -{ - if ( !this->ownerCase() ) return; - - cvf::ref transForm = displayCoordTransform(); - m_cellfilterPartManager->appendGeometryPartsToModel( cellFilterModel, transForm.p(), ownerCase()->allCellsBoundingBox() ); - - cellFilterModel->updateBoundingBoxesRecursive(); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -1716,28 +1699,6 @@ void Rim3dView::updateScreenSpaceModel() nativeOrOverrideViewer()->addStaticModelOnce( m_screenSpaceModel.p(), isUsingOverrideViewer() ); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void Rim3dView::appendCellFiltersToModel() -{ - if ( !nativeOrOverrideViewer() ) return; - - cvf::Scene* frameScene = nativeOrOverrideViewer()->frame( m_currentTimeStep, isUsingOverrideViewer() ); - if ( frameScene ) - { - cvf::String name = "CellFilters"; - this->removeModelByName( frameScene, name ); - - cvf::ref model = new cvf::ModelBasicList; - model->setName( name ); - - addCellFiltersToModel( model.p() ); - - frameScene->addModel( model.p() ); - } -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/Rim3dView.h b/ApplicationLibCode/ProjectDataModel/Rim3dView.h index e25459dacd..a193617c6a 100644 --- a/ApplicationLibCode/ProjectDataModel/Rim3dView.h +++ b/ApplicationLibCode/ProjectDataModel/Rim3dView.h @@ -52,7 +52,6 @@ class RiuViewer; class RivAnnotationsPartMgr; class RivMeasurementPartMgr; class RivWellPathsPartMgr; -class RivCellFilterPartMgr; class RimViewNameConfig; namespace cvf @@ -222,7 +221,6 @@ class Rim3dView : public RimViewWindow, public RiuViewerToViewInterface, public double characteristicCellSize ); void addAnnotationsToModel( cvf::ModelBasicList* annotationsModel ); void addMeasurementToModel( cvf::ModelBasicList* measureModel ); - void addCellFiltersToModel( cvf::ModelBasicList* cellFilterModel ); // Override viewer @@ -311,7 +309,6 @@ class Rim3dView : public RimViewWindow, public RiuViewerToViewInterface, public void createHighlightAndGridBoxDisplayModel(); void appendMeasurementToModel(); - void appendCellFiltersToModel(); void appendAnnotationsToModel(); void updateScreenSpaceModel(); @@ -349,7 +346,6 @@ class Rim3dView : public RimViewWindow, public RiuViewerToViewInterface, public // 3D display model data cvf::ref m_annotationsPartManager; cvf::ref m_measurementPartManager; - cvf::ref m_cellfilterPartManager; // Timer for animations std::unique_ptr m_animationTimer;