mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4012 Always place well target points in real cell geometry
This commit is contained in:
@@ -474,7 +474,7 @@ const caf::NavigationPolicy* caf::Viewer::getNavigationPolicy() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool caf::Viewer::rayPick(int winPosX, int winPosY, cvf::HitItemCollection* pickedPoints)
|
||||
bool caf::Viewer::rayPick(int winPosX, int winPosY, cvf::HitItemCollection* pickedPoints, cvf::Vec3d* globalRayOrigin/*=nullptr*/)
|
||||
{
|
||||
CVF_ASSERT(m_mainRendering.notNull());
|
||||
|
||||
@@ -485,7 +485,11 @@ bool caf::Viewer::rayPick(int winPosX, int winPosY, cvf::HitItemCollection* pick
|
||||
if (ris.notNull())
|
||||
{
|
||||
bool retVal = m_mainRendering->rayIntersect(*ris, pickedPoints);
|
||||
|
||||
if (retVal && globalRayOrigin)
|
||||
{
|
||||
CVF_ASSERT(ris->ray() != nullptr);
|
||||
*globalRayOrigin = ris->ray()->origin();
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
// Test whether it is any point in doing navigation etc.
|
||||
bool canRender() const;
|
||||
|
||||
bool rayPick(int winPosX, int winPosY, cvf::HitItemCollection* pickedPoints) ;
|
||||
bool rayPick(int winPosX, int winPosY, cvf::HitItemCollection* pickedPoints, cvf::Vec3d* rayGlobalOrigin = nullptr) ;
|
||||
cvf::OverlayItem* overlayItem(int winPosX, int winPosY);
|
||||
|
||||
// QPainter based drawing on top of the OpenGL graphics
|
||||
|
||||
Reference in New Issue
Block a user