#2621 Improve interface of part managers to prepare for use in 2D intersection views

This commit is contained in:
Magne Sjaastad
2018-03-16 11:21:57 +01:00
parent 08a978d0d7
commit 471d625051
6 changed files with 101 additions and 90 deletions

View File

@@ -1,24 +1,23 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2018 Statoil ASA
//
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cvfBase.h"
#include "cvfCollection.h"
#include "cvfObject.h"
@@ -29,17 +28,16 @@
#include <map>
namespace cvf
{
class BoundingBox;
class Transform;
class ModelBasicList;
}
class BoundingBox;
class Transform;
class ModelBasicList;
} // namespace cvf
namespace caf
{
class DisplayCoordTransform;
class DisplayCoordTransform;
}
class Rim3dView;
@@ -48,7 +46,7 @@ class RimWellPathCollection;
class RimWellPath;
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
class RivWellPathsPartMgr : public cvf::Object
{
@@ -56,29 +54,28 @@ public:
explicit RivWellPathsPartMgr(Rim3dView* view);
~RivWellPathsPartMgr();
void appendStaticGeometryPartsToModel(cvf::ModelBasicList* model,
double characteristicCellSize,
const cvf::BoundingBox& wellPathClipBoundingBox,
const caf::DisplayCoordTransform* displayCoordTransform);
void appendStaticFracturePartsToModel(cvf::ModelBasicList* model);
void appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model,
double characteristicCellSize,
const cvf::BoundingBox& wellPathClipBoundingBox,
const caf::DisplayCoordTransform* displayCoordTransform);
size_t segmentIndexFromTriangleIndex(size_t triangleIndex, RimWellPath* wellPath) const;
void appendStaticGeometryPartsToModel(cvf::ModelBasicList* model,
const caf::DisplayCoordTransform* displayCoordTransform,
double characteristicCellSize,
const cvf::BoundingBox& wellPathClipBoundingBox);
void appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model,
size_t timeStepIndex,
const caf::DisplayCoordTransform* displayCoordTransform,
double characteristicCellSize,
const cvf::BoundingBox& wellPathClipBoundingBox);
void appendStaticFracturePartsToModel(cvf::ModelBasicList* model);
size_t segmentIndexFromTriangleIndex(size_t triangleIndex, RimWellPath* wellPath) const;
private:
void clearGeometryCache();
void scheduleGeometryRegen();
void createPartManagersIfRequired();
RimWellPathCollection* wellPathCollection() const;
bool isWellPathVisible() const;
bool isWellPathVisible() const;
private:
caf::PdmPointer<Rim3dView> m_rimView;