#1427 Apply specific changes from pre-proto regarding selection in 3D

To be used for transporting branch index from 3D context menu operation to feature.
This commit is contained in:
Jacob Støren
2017-04-25 15:49:07 +02:00
parent 1f7c357b67
commit f40cf3a9b7
4 changed files with 123 additions and 2 deletions

View File

@@ -21,6 +21,10 @@
#include "RimEclipseView.h"
#include "RimGeoMechView.h"
#include "RimWellPath.h"
#include "RivSimWellPipeSourceInfo.h"
#include "RivWellPathSourceInfo.h"
#include "RiuSelectionChangedHandler.h"
@@ -63,6 +67,24 @@ void RiuSelectionManager::selectedItems(std::vector<RiuSelectionItem*>& items, i
items = s;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuSelectionItem* RiuSelectionManager::selectedItem(int role /*= RUI_APPLICATION_GLOBAL*/) const
{
const std::vector<RiuSelectionItem*>& s = m_selection[role];
if (s.size() == 1)
{
if (s[0])
{
return s[0];
}
}
return nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -181,3 +203,27 @@ RiuGeoMechSelectionItem::RiuGeoMechSelectionItem(RimGeoMechView* view,
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuWellPathSelectionItem::RiuWellPathSelectionItem(const RivWellPathSourceInfo* wellPathSourceInfo,
const cvf::Vec3d& pipeCenterLineIntersectionInDomainCoords,
double measuredDepth)
: m_pipeCenterlineIntersectionInDomainCoords(pipeCenterLineIntersectionInDomainCoords),
m_measuredDepth(measuredDepth)
{
m_wellpath = wellPathSourceInfo->wellPath();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuSimWellSelectionItem::RiuSimWellSelectionItem(RimEclipseWell* simwell,
cvf::Vec3d m_domainCoord,
size_t m_branchIndex)
: m_simWell(simwell),
m_domainCoord(m_domainCoord),
m_branchIndex(m_branchIndex)
{
}