#2333 Add flattened intersectino geometry. Some view modifications to move towards a final 2D view experience

This commit is contained in:
Jacob Støren
2018-01-25 17:37:22 +01:00
parent 47d8508196
commit 02f6b95959
17 changed files with 336 additions and 180 deletions

View File

@@ -47,6 +47,7 @@
#include "cvfBoundingBox.h"
#include "cvfGeometryTools.h"
#include "cvfPlane.h"
#include "Rim2dIntersectionView.h"
namespace caf {
@@ -723,6 +724,24 @@ void RimIntersection::appendPointToPolyLine(const cvf::Vec3d& point)
rebuildGeometryAndScheduleCreateDisplayModel();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
Rim2dIntersectionView* RimIntersection::correspondingIntersectionView()
{
std::vector<caf::PdmObjectHandle*> objects;
this->objectsWithReferringPtrFields(objects);
Rim2dIntersectionView* isectView = nullptr;
for (auto obj : objects)
{
isectView = dynamic_cast<Rim2dIntersectionView*>(obj);
if (isectView) break;
}
return isectView;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -851,6 +870,13 @@ void RimIntersection::rebuildGeometryAndScheduleCreateDisplayModel()
{
rimView->scheduleCreateDisplayModelAndRedraw();
}
Rim2dIntersectionView * iview = correspondingIntersectionView();
if (iview)
{
iview->scheduleGeometryRegen(RivCellSetEnum::ALL_CELLS);
iview->scheduleCreateDisplayModelAndRedraw();
}
}
//--------------------------------------------------------------------------------------------------