mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3700 Add visual picking marker and improve map results
* Fix "off by half a cell" errors and improve smoothness using averaging and interpolation
This commit is contained in:
@@ -62,19 +62,26 @@ bool RicContourMapPickEventHandler::handlePickEvent(const Ric3DPickEvent& eventO
|
||||
contourMap->firstAncestorOrThisOfTypeAsserted(view);
|
||||
|
||||
cvf::Vec2d pickedPoint;
|
||||
cvf::Vec2ui pickedCell;
|
||||
double valueAtPoint = 0.0;
|
||||
if (contourMap->checkForMapIntersection(firstPickedItem.globalPickedPoint(), &pickedPoint, &valueAtPoint))
|
||||
if (contourMap->checkForMapIntersection(firstPickedItem.globalPickedPoint(), &pickedPoint, &pickedCell, &valueAtPoint))
|
||||
{
|
||||
QString curveText;
|
||||
curveText += QString("%1\n").arg(view->createAutoName());
|
||||
curveText += QString("Picked Point X, Y: %1, %2\n").arg(pickedPoint.x(), 5, 'f', 0).arg(pickedPoint.y(), 5, 'f', 0);
|
||||
curveText += QString("Picked Cell I, J: %1, %2\n").arg(pickedCell.x()).arg(pickedCell.y());
|
||||
curveText += QString("Result Type: %1\n").arg(contourMap->resultDescriptionText());
|
||||
curveText += QString("Aggregated Value: %1\n").arg(valueAtPoint);
|
||||
|
||||
RiuMainWindow::instance()->setResultInfo(curveText);
|
||||
|
||||
contourMap->setPickPoint(pickedPoint);
|
||||
view->updateCurrentTimeStepAndRedraw();
|
||||
return true;
|
||||
}
|
||||
contourMap->setPickPoint(cvf::Vec2d::UNDEFINED);
|
||||
view->updateCurrentTimeStepAndRedraw();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user