mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3699 Show global east west position when picking on Contour Maps.
This commit is contained in:
@@ -1008,13 +1008,18 @@ void RimContourMapProjection::updatedWeightingResult()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimContourMapProjection::checkForMapIntersection(const cvf::Vec3d& localPoint3d, cvf::Vec2ui* contourMapIJ, double* valueAtPoint) const
|
||||
bool RimContourMapProjection::checkForMapIntersection(const cvf::Vec3d& localPoint3d, cvf::Vec2d* contourMapPoint, double* valueAtPoint) const
|
||||
{
|
||||
CVF_TIGHT_ASSERT(contourMapIJ);
|
||||
CVF_TIGHT_ASSERT(contourMapPoint);
|
||||
CVF_TIGHT_ASSERT(valueAtPoint);
|
||||
cvf::Vec2d localPos2d(localPoint3d.x(), localPoint3d.y());
|
||||
*contourMapIJ = ijFromLocalPos(localPos2d);
|
||||
*valueAtPoint = value(contourMapIJ->x(), contourMapIJ->y());
|
||||
cvf::Vec2ui pickedCellIJ = ijFromLocalPos(localPos2d);
|
||||
*valueAtPoint = value(pickedCellIJ.x(), pickedCellIJ.y());
|
||||
|
||||
cvf::BoundingBox boundingBox = expandedBoundingBox();
|
||||
cvf::Vec2d origin(boundingBox.min().x(), boundingBox.min().y());
|
||||
*contourMapPoint = localPos2d + origin;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
QString resultDescriptionText() const;
|
||||
void updatedWeightingResult();
|
||||
|
||||
bool checkForMapIntersection(const cvf::Vec3d& localPoint3d, cvf::Vec2ui* contourMapIJ, double* valueAtPoint) const;
|
||||
bool checkForMapIntersection(const cvf::Vec3d& localPoint3d, cvf::Vec2d* contourMapPoint, double* valueAtPoint) const;
|
||||
|
||||
protected:
|
||||
double calculateValue(uint i, uint j) const;
|
||||
|
||||
Reference in New Issue
Block a user