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:
@@ -68,6 +68,8 @@ public:
|
||||
void generateVertices(cvf::Vec3fArray* vertices, const caf::DisplayCoordTransform* displayCoordTransform);
|
||||
|
||||
ContourPolygons generateContourPolygons(const caf::DisplayCoordTransform* displayCoordTransform);
|
||||
cvf::ref<cvf::Vec3fArray> generatePickPointPolygon(const caf::DisplayCoordTransform* displayCoordTransform);
|
||||
|
||||
void generateResults();
|
||||
double maxValue() const;
|
||||
double minValue() const;
|
||||
@@ -75,6 +77,9 @@ public:
|
||||
double sumAllValues() const;
|
||||
double sampleSpacing() const;
|
||||
double sampleSpacingFactor() const;
|
||||
cvf::Vec2ui mapSize() const;
|
||||
cvf::Vec2ui vertexGridSize() const;
|
||||
|
||||
bool showContourLines() const;
|
||||
|
||||
const std::vector<double>& aggregatedResults() const;
|
||||
@@ -82,40 +87,47 @@ public:
|
||||
bool isMeanResult() const;
|
||||
bool isSummationResult() const;
|
||||
bool isStraightSummationResult() const;
|
||||
static bool isStraightSummationResult(ResultAggregationEnum aggregationType);
|
||||
bool isColumnResult() const;
|
||||
|
||||
double value(uint i, uint j) const;
|
||||
double valueAtVertex(uint i, uint j) const;
|
||||
bool hasResultAtVertex(uint i, uint j) const;
|
||||
|
||||
bool hasResultAt(uint i, uint j) const;
|
||||
|
||||
cvf::Vec2ui surfaceGridSize() const;
|
||||
uint vertexCount() const;
|
||||
uint validVertexCount() const;
|
||||
RimRegularLegendConfig* legendConfig() const;
|
||||
|
||||
size_t gridIndex(uint i, uint j) const;
|
||||
cvf::Vec2ui ijFromGridIndex(size_t gridIndex) const;
|
||||
size_t cellIndex(uint i, uint j) const;
|
||||
size_t vertexIndex(uint i, uint j) const;
|
||||
cvf::Vec2ui ijFromVertexIndex(size_t gridIndex) const;
|
||||
cvf::Vec2ui ijFromCellIndex(size_t mapIndex) const;
|
||||
void updateLegend();
|
||||
|
||||
size_t numberOfVertices() const;
|
||||
uint numberOfCells() const;
|
||||
uint numberOfValidCells() const;
|
||||
|
||||
ResultAggregation resultAggregation() const;
|
||||
QString resultAggregationText() const;
|
||||
QString resultDescriptionText() const;
|
||||
void updatedWeightingResult();
|
||||
|
||||
bool checkForMapIntersection(const cvf::Vec3d& localPoint3d, cvf::Vec2d* contourMapPoint, double* valueAtPoint) const;
|
||||
bool checkForMapIntersection(const cvf::Vec3d& localPoint3d, cvf::Vec2d* contourMapPoint, cvf::Vec2ui* contourMapCell, double* valueAtPoint) const;
|
||||
void setPickPoint(cvf::Vec2d pickedPoint);
|
||||
|
||||
protected:
|
||||
double calculateValue(uint i, uint j) const;
|
||||
|
||||
cvf::BoundingBox expandedBoundingBox() const;
|
||||
double valueInCell(uint i, uint j) const;
|
||||
bool hasResultInCell(uint i, uint j) const;
|
||||
|
||||
double calculateValueInCell(uint i, uint j) const;
|
||||
double calculateValueAtVertex(uint i, uint j) const;
|
||||
|
||||
void generateGridMapping();
|
||||
void calculateTotalCellVisibility();
|
||||
cvf::Vec2d globalPos2d(uint i, uint j) const;
|
||||
cvf::Vec2d cellCenterPos(uint i, uint j) const;
|
||||
cvf::Vec2ui ijFromLocalPos(const cvf::Vec2d& localPos2d) const;
|
||||
|
||||
const std::vector<std::pair<size_t, double>>& cellsAtPos2d(uint i, uint j) const;
|
||||
std::vector<double> xPositions() const;
|
||||
std::vector<double> yPositions() const;
|
||||
std::vector<std::pair<size_t, double>> cellsAtPos2d(uint i, uint j) const;
|
||||
std::vector<double> xVertexPositions() const;
|
||||
std::vector<double> yVertexPositions() const;
|
||||
|
||||
std::vector<std::pair<size_t, double>> visibleCellsAndOverlapVolumeFrom2dPoint(const cvf::Vec2d& globalPos2d, const std::vector<double>* weightingResultValues = nullptr) const;
|
||||
std::vector<std::pair<size_t, double>> visibleCellsAndLengthInCellFrom2dPoint(const cvf::Vec2d& globalPos2d, const std::vector<double>* weightingResultValues = nullptr) const;
|
||||
@@ -131,6 +143,9 @@ protected:
|
||||
void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
|
||||
void initAfterRead() override;
|
||||
bool getLegendRangeFrom3dGrid() const;
|
||||
void updateGridInformation();
|
||||
cvf::Vec2ui calculateMapSize() const;
|
||||
|
||||
protected:
|
||||
caf::PdmField<double> m_relativeSampleSpacing;
|
||||
caf::PdmField<ResultAggregation> m_resultAggregation;
|
||||
@@ -139,9 +154,17 @@ protected:
|
||||
caf::PdmChildField<RimEclipseResultDefinition*> m_weightingResult;
|
||||
cvf::ref<cvf::UByteArray> m_cellGridIdxVisibility;
|
||||
|
||||
std::vector<double> m_aggregatedResults;
|
||||
std::vector<double> m_aggregatedResults;
|
||||
std::vector<double> m_aggregatedVertexResults;
|
||||
|
||||
std::vector<std::vector<std::pair<size_t, double>>> m_projected3dGridIndices;
|
||||
|
||||
cvf::ref<RigResultAccessor> m_resultAccessor;
|
||||
|
||||
|
||||
cvf::Vec2d m_pickPoint;
|
||||
|
||||
cvf::Vec2ui m_mapSize;
|
||||
cvf::BoundingBox m_cellCenterBoundingBox;
|
||||
cvf::BoundingBox m_fullBoundingBox;
|
||||
double m_sampleSpacing;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user