#4012 Always place well target points in real cell geometry

This commit is contained in:
Gaute Lindkvist
2019-01-31 15:49:12 +01:00
parent bd6bbe9da9
commit 107a4b9b60
7 changed files with 121 additions and 12 deletions

View File

@@ -158,9 +158,10 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event)
std::vector<RiuPickItemInfo> pickItemInfos;
{
cvf::HitItemCollection hitItems;
if (m_viewer->rayPick(event->x(), event->y(), &hitItems))
cvf::Vec3d globalRayOrigin;
if (m_viewer->rayPick(event->x(), event->y(), &hitItems, &globalRayOrigin))
{
pickItemInfos = RiuPickItemInfo::convertToPickItemInfos(hitItems);
pickItemInfos = RiuPickItemInfo::convertToPickItemInfos(hitItems, globalRayOrigin);
}
}
@@ -524,15 +525,16 @@ void RiuViewerCommands::handlePickAction(int winPosX, int winPosY, Qt::KeyboardM
std::vector<RiuPickItemInfo> pickItemInfos;
{
cvf::Vec3d globalRayOrigin;
cvf::HitItemCollection hitItems;
m_viewer->rayPick(winPosX, winPosY, &hitItems);
m_viewer->rayPick(winPosX, winPosY, &hitItems, &globalRayOrigin);
// Do specialized text pick, since vizfwk does not hit text
handleTextPicking(winPosX, winPosY, &hitItems);
if (hitItems.count())
{
pickItemInfos = RiuPickItemInfo::convertToPickItemInfos(hitItems);
pickItemInfos = RiuPickItemInfo::convertToPickItemInfos(hitItems, globalRayOrigin);
}
}