summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeoprojection_p.h
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-07-06 09:53:21 +0200
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-07-17 12:40:30 +0000
commitb02916a5568d57eda767ca930dcdb366179250bc (patch)
treea5cf227e6f70faf5b931a4a122b53f37a8a6b8cc /src/location/maps/qgeoprojection_p.h
parentd4cb4961ed0a15d0746d96da38228787658d87bd (diff)
downloadqtlocation-b02916a5568d57eda767ca930dcdb366179250bc.tar.gz
Fix Map.toCoordinate always clamping y values to 0
This patch allows to call toCoordinate also on negative y values, given that the y value is still below the horizon. If not, the y value will be clamped to the "minimum unprojectable y value", a value that is clamped to 0. Task-number: QTBUG-61813 Change-Id: I177d3b459b6eaf827daf860b7d4011511a7e76ee Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Diffstat (limited to 'src/location/maps/qgeoprojection_p.h')
-rw-r--r--src/location/maps/qgeoprojection_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/location/maps/qgeoprojection_p.h b/src/location/maps/qgeoprojection_p.h
index 3a0dec1d..7d306eea 100644
--- a/src/location/maps/qgeoprojection_p.h
+++ b/src/location/maps/qgeoprojection_p.h
@@ -128,7 +128,7 @@ public:
QList<QDoubleVector2D> visibleRegion() const Q_DECL_OVERRIDE;
inline QDoubleVector2D viewportToWrappedMapProjection(const QDoubleVector2D &itemPosition) const;
-
+ inline QDoubleVector2D viewportToWrappedMapProjection(const QDoubleVector2D &itemPosition, double &s) const;
private:
void setupCamera();
void updateVisibleRegion();
@@ -151,6 +151,7 @@ public:
Plane(const QDoubleVector3D &planePoint, const QDoubleVector3D &planeNormal);
QDoubleVector3D lineIntersection(const QDoubleVector3D &linePoint, const QDoubleVector3D &lineDirection) const;
+ inline QDoubleVector3D lineIntersection(const QDoubleVector3D &linePoint, const QDoubleVector3D &lineDirection, double &s) const;
Line2D planeXYIntersection() const;
bool isValid() const;