#2609 Update the visualization when the well path geometry definition changes

This commit is contained in:
Jacob Støren
2018-07-02 14:51:17 +02:00
parent 0f39356fcb
commit dc95b217c5
7 changed files with 120 additions and 15 deletions

View File

@@ -1,4 +1,5 @@
#include "RimWellPathTarget.h"
#include "RimModeledWellPath.h"
CAF_PDM_SOURCE_INIT(RimWellPathTarget, "WellPathTarget");
@@ -41,7 +42,7 @@ RimWellPathTarget::~RimWellPathTarget()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPathTarget::setAsPointTarget(const cvf::Vec3d& point)
void RimWellPathTarget::setAsPointTargetXYD(const cvf::Vec3d& point)
{
m_targetType = POINT;
m_targetPoint = point;
@@ -73,9 +74,11 @@ RimWellPathTarget::TargetTypeEnum RimWellPathTarget::targetType()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::Vec3d RimWellPathTarget::targetPoint()
cvf::Vec3d RimWellPathTarget::targetPointXYZ()
{
return m_targetPoint();
cvf::Vec3d xyzPoint(m_targetPoint());
xyzPoint.z() = -xyzPoint.z();
return xyzPoint;
}
//--------------------------------------------------------------------------------------------------
@@ -107,3 +110,13 @@ double RimWellPathTarget::inclination()
return std::numeric_limits<double>::infinity();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPathTarget::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
{
RimModeledWellPath* wellPath;
firstAncestorOrThisOfTypeAsserted(wellPath);
wellPath->updateWellPathVisualization();
}