mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-07 14:43:10 -06:00
#1025 Use DisplayCoordTransform for coordinate transformations
This commit is contained in:
parent
600f3da30a
commit
3922d51790
@ -25,6 +25,7 @@
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEclipseWell.h"
|
||||
|
||||
#include "cafDisplayCoordTransform.h"
|
||||
#include "cafEffectGenerator.h"
|
||||
#include "cafPdmFieldCvfColor.h"
|
||||
#include "cafPdmFieldCvfMat4d.h"
|
||||
@ -37,8 +38,6 @@
|
||||
#include "cvfPart.h"
|
||||
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -93,15 +92,10 @@ void RivWellSpheresPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicLis
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
cvf::ref<caf::DisplayCoordTransform> transForm = m_rimReservoirView->displayCoordTransform();
|
||||
for (cvf::Vec3d c : cellCenters)
|
||||
{
|
||||
cvf::Vec4d transfCoord = m_scaleTransform->worldTransform() * cvf::Vec4d(c - mainGrid->displayModelOffset(), 1);
|
||||
|
||||
cvf::Vec3d displayCoord;
|
||||
displayCoord[0] = transfCoord[0];
|
||||
displayCoord[1] = transfCoord[1];
|
||||
displayCoord[2] = transfCoord[2];
|
||||
cvf::Vec3d displayCoord = transForm->transformToDisplayCoord(c);
|
||||
|
||||
cvf::ref<cvf::DrawableGeo> geo = createSphere(10, displayCoord);
|
||||
cvf::ref<cvf::Part> part = createPart(geo.p());
|
||||
|
Loading…
Reference in New Issue
Block a user