#3636 Temporary LGR : Always rebuild geometry of intersections

This commit is contained in:
Magne Sjaastad 2018-11-06 10:09:30 +01:00
parent 59c1f612fb
commit f2b8f8487c
7 changed files with 37 additions and 0 deletions

View File

@ -496,6 +496,7 @@ void RimEclipseView::createDisplayModel()
// Cross sections
m_crossSectionVizModel->removeAllParts();
m_crossSectionCollection->rebuildGeometry();
m_crossSectionCollection->appendPartsToModel(*this, m_crossSectionVizModel.p(), m_reservoirGridPartManager->scaleTransform());
m_viewer->addStaticModelOnce(m_crossSectionVizModel.p());

View File

@ -500,6 +500,14 @@ RivIntersectionPartMgr* RimIntersection::intersectionPartMgr()
return m_crossSectionPartMgr.p();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersection::rebuildGeometry()
{
m_crossSectionPartMgr = nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -89,6 +89,7 @@ public:
Rim2dIntersectionView* correspondingIntersectionView();
RivIntersectionPartMgr* intersectionPartMgr();
void rebuildGeometry();
std::vector <cvf::Vec3d> polyLinesForExtrusionDirection() const;
void appendPointToExtrusionDirection(const cvf::Vec3d& point);

View File

@ -229,6 +229,14 @@ void RimIntersectionBox::appendManipulatorPartsToModel(cvf::ModelBasicList* mode
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionBox::rebuildGeometry()
{
m_intersectionBoxPartMgr = nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -70,8 +70,10 @@ public:
SinglePlaneState singlePlaneState() const;
bool show3dManipulator() const;
RivIntersectionBoxPartMgr* intersectionBoxPartMgr();
void appendManipulatorPartsToModel(cvf::ModelBasicList* model);
void rebuildGeometry();
void setToDefaultSizeBox();
void setToDefaultSizeSlice(SinglePlaneState plane, const cvf::Vec3d& position);

View File

@ -151,6 +151,22 @@ void RimIntersectionCollection::appendPartsToModel(Rim3dView& view, cvf::ModelBa
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionCollection::rebuildGeometry()
{
for (RimIntersection* intersection : m_intersections)
{
intersection->rebuildGeometry();
}
for (RimIntersectionBox* intersectionBox : m_intersectionBoxes)
{
intersectionBox->rebuildGeometry();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -72,6 +72,7 @@ public:
const cvf::ScalarMapper* scalarColorMapper,
const RivTernaryScalarMapper* ternaryColorMapper);
void appendPartsToModel(Rim3dView& view, cvf::ModelBasicList* model, cvf::Transform* scaleTransform);
void rebuildGeometry();
std::vector<RimIntersection*> intersections() const;
std::vector<RimIntersectionBox*> intersectionBoxes() const;