#1440 Merge dev into pre-proto (WellPath viz restructure and constness)

Had to do quite a bit constness fiddeling to make the merge work
This commit is contained in:
Jacob Støren
2017-06-22 10:42:07 +02:00
50 changed files with 650 additions and 510 deletions

View File

@@ -37,8 +37,6 @@
#include "RiuMainWindow.h"
#include "RivWellPathCollectionPartMgr.h"
#include "RifWellPathImporter.h"
#include "cafPdmUiEditorHandle.h"
@@ -50,6 +48,7 @@
#include <fstream>
#include <cmath>
#include "RivWellPathPartMgr.h"
namespace caf
{
@@ -94,8 +93,6 @@ RimWellPathCollection::RimWellPathCollection()
wellPaths.uiCapability()->setUiHidden(true);
m_wellPathCollectionPartManager = new RivWellPathCollectionPartMgr(this);
m_wellPathImporter = new RifWellPathImporter;
}
@@ -115,7 +112,7 @@ RimWellPathCollection::~RimWellPathCollection()
//--------------------------------------------------------------------------------------------------
void RimWellPathCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
{
scheduleGeometryRegenAndRedrawViews();
scheduleRedrawAffectedViews();
}
@@ -327,14 +324,51 @@ caf::PdmFieldHandle* RimWellPathCollection::objectToggleField()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPathCollection::scheduleGeometryRegenAndRedrawViews()
void RimWellPathCollection::scheduleRedrawAffectedViews()
{
m_wellPathCollectionPartManager->scheduleGeometryRegen();
RimProject* proj;
this->firstAncestorOrThisOfType(proj);
if (proj) proj->createDisplayModelAndRedrawAllViews();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPathCollection::appendStaticGeometryPartsToModel(cvf::ModelBasicList* model,
double characteristicCellSize,
const cvf::BoundingBox& wellPathClipBoundingBox,
const caf::DisplayCoordTransform* displayCoordTransform)
{
if (!this->isActive()) return;
if (this->wellPathVisibility() == RimWellPathCollection::FORCE_ALL_OFF) return;
for (size_t wIdx = 0; wIdx < this->wellPaths.size(); wIdx++)
{
RivWellPathPartMgr* partMgr = this->wellPaths[wIdx]->partMgr();
partMgr->appendStaticGeometryPartsToModel(model, characteristicCellSize, wellPathClipBoundingBox, displayCoordTransform);
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPathCollection::appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model,
const QDateTime& timeStamp,
double characteristicCellSize,
const cvf::BoundingBox& wellPathClipBoundingBox,
const caf::DisplayCoordTransform* displayCoordTransform)
{
if (!this->isActive()) return;
if (this->wellPathVisibility() == RimWellPathCollection::FORCE_ALL_OFF) return;
for (size_t wIdx = 0; wIdx < this->wellPaths.size(); wIdx++)
{
RivWellPathPartMgr* partMgr = this->wellPaths[wIdx]->partMgr();
partMgr->appendDynamicGeometryPartsToModel(model, timeStamp, characteristicCellSize, wellPathClipBoundingBox, displayCoordTransform);
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------