Fix eclipse case contour map left click (#11378)

* Make sure we operate in the correct domain when picking points in the contour map
This commit is contained in:
jonjenssen authored and GitHub committed 2024-04-17 11:53:29 +02:00
1 parent 38e4cc364b
commit 5b4da82844
3 files changed
+26 -25

No files matched your search

@@ -399,12 +399,12 @@ size_t RimContourMapProjection::numberOfVertices() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimContourMapProjection::checkForMapIntersection( const cvf::Vec3d& localPoint3d, cvf::Vec2d* contourMapPoint, double* valueAtPoint ) const
bool RimContourMapProjection::checkForMapIntersection( const cvf::Vec3d& domainPoint3d, cvf::Vec2d* contourMapPoint, double* valueAtPoint ) const
{
CVF_TIGHT_ASSERT( contourMapPoint );
CVF_TIGHT_ASSERT( valueAtPoint );
cvf::Vec3d mapPos3d = localPoint3d - m_expandedBoundingBox.min() + m_gridBoundingBox.min();
cvf::Vec3d mapPos3d = domainPoint3d - m_expandedBoundingBox.min();
cvf::Vec2d mapPos2d( mapPos3d.x(), mapPos3d.y() );
cvf::Vec2d gridorigin( m_expandedBoundingBox.min().x(), m_expandedBoundingBox.min().y() );
@@ -113,7 +113,7 @@ public:
uint numberOfValidCells() const;
size_t numberOfVertices() const;
bool checkForMapIntersection( const cvf::Vec3d& localPoint3d, cvf::Vec2d* contourMapPoint, double* valueAtPoint ) const;
bool checkForMapIntersection( const cvf::Vec3d& domainPoint3d, cvf::Vec2d* contourMapPoint, double* valueAtPoint ) const;
void setPickPoint( cvf::Vec2d globalPickPoint );
cvf::Vec3d origin3d() const;