Remove scale transform

This commit is contained in:
Magne Sjaastad
2017-06-19 22:15:28 +02:00
parent 994198d388
commit 210bdab4c3
8 changed files with 21 additions and 80 deletions

View File

@@ -424,18 +424,9 @@ void RimEclipseView::createDisplayModel()
*/
// Well path model
m_wellPathPipeVizModel->removeAllParts();
RigMainGrid* mainGrid = this->mainGrid();
if (mainGrid)
{
addWellPathsToModel(m_wellPathPipeVizModel.p(),
mainGrid->displayModelOffset(),
mainGrid->characteristicIJCellSize(),
currentActiveCellInfo()->geometryBoundingBox(),
m_reservoirGridPartManager->scaleTransform());
}
addWellPathsToModel(m_wellPathPipeVizModel.p(), currentActiveCellInfo()->geometryBoundingBox());
m_viewer->addStaticModelOnce(m_wellPathPipeVizModel.p());

View File

@@ -210,15 +210,10 @@ void RimGeoMechView::createDisplayModel()
// Well path model
double characteristicCellSize = geoMechCase()->geoMechData()->femParts()->characteristicElementSize();
cvf::BoundingBox femBBox = geoMechCase()->geoMechData()->femParts()->boundingBox();
m_wellPathPipeVizModel->removeAllParts();
addWellPathsToModel(m_wellPathPipeVizModel.p(),
cvf::Vec3d(0, 0, 0),
characteristicCellSize,
femBBox,
scaleTransform());
addWellPathsToModel(m_wellPathPipeVizModel.p(), femBBox);
m_viewer->addStaticModelOnce(m_wellPathPipeVizModel.p());

View File

@@ -732,17 +732,14 @@ void RimView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QV
///
//--------------------------------------------------------------------------------------------------
void RimView::addWellPathsToModel(cvf::ModelBasicList* wellPathModelBasicList,
const cvf::Vec3d& displayModelOffset,
double characteristicCellSize,
const cvf::BoundingBox& wellPathClipBoundingBox,
cvf::Transform* scaleTransform)
const cvf::BoundingBox& wellPathClipBoundingBox)
{
if (!this->ownerCase()) return;
cvf::ref<caf::DisplayCoordTransform> transForm = displayCoordTransform();
wellPathsPartManager()->appendStaticGeometryPartsToModel(wellPathModelBasicList,
displayModelOffset,
scaleTransform,
characteristicCellSize,
this->ownerCase()->characteristicCellSize(),
wellPathClipBoundingBox,
transForm.p());

View File

@@ -178,10 +178,7 @@ protected:
void setDefaultView();
void addWellPathsToModel(cvf::ModelBasicList* wellPathModelBasicList,
const cvf::Vec3d& displayModelOffset,
double characteristicCellSize,
const cvf::BoundingBox& wellPathClipBoundingBox,
cvf::Transform* scaleTransform);
const cvf::BoundingBox& wellPathClipBoundingBox);
static void removeModelByName(cvf::Scene* scene, const cvf::String& modelName);