[Marble-commits] branches/KDE/4.3/kdeedu/marble/src/lib/Projections
Torsten Rahn
tackat at kde.org
Fri Jul 17 19:30:40 CEST 2009
SVN commit 998456 by rahn:
- Backport of r998455.
M +1 -1 AbstractProjection.h
M +2 -2 EquirectProjection.cpp
M +2 -2 EquirectProjection.h
M +4 -3 MercatorProjection.cpp
M +1 -1 MercatorProjection.h
M +2 -2 SphericalProjection.cpp
M +2 -14 SphericalProjection.h
--- branches/KDE/4.3/kdeedu/marble/src/lib/Projections/AbstractProjection.h #998455:998456
@@ -185,7 +185,7 @@
* @return @c true if the pixel (x, y) is within the globe
* @c false if the pixel (x, y) is outside the globe, i.e. in space.
*/
- virtual bool geoCoordinates( int x, int y,
+ virtual bool geoCoordinates( const int x, const int y,
const ViewportParams *viewport,
qreal& lon, qreal& lat,
Marble::GeoDataCoordinates::Unit unit = Marble::GeoDataCoordinates::Degree ) = 0;
--- branches/KDE/4.3/kdeedu/marble/src/lib/Projections/EquirectProjection.cpp #998455:998456
@@ -48,7 +48,7 @@
return -90.0 * DEG2RAD;
}
-bool EquirectProjection::screenCoordinates( qreal lon, qreal lat,
+bool EquirectProjection::screenCoordinates( const qreal lon, const qreal lat,
const ViewportParams *viewport,
qreal& x, qreal& y )
{
@@ -190,7 +190,7 @@
}
-bool EquirectProjection::geoCoordinates( int x, int y,
+bool EquirectProjection::geoCoordinates( const int x, const int y,
const ViewportParams *viewport,
qreal& lon, qreal& lat,
GeoDataCoordinates::Unit unit )
--- branches/KDE/4.3/kdeedu/marble/src/lib/Projections/EquirectProjection.h #998455:998456
@@ -66,7 +66,7 @@
* @return @c true if the geographical coordinates are visible on the screen
* @c false if the geographical coordinates are not visible on the screen
*/
- bool screenCoordinates( qreal lon, qreal lat,
+ bool screenCoordinates( const qreal lon, const qreal lat,
const ViewportParams *params,
qreal& x, qreal& y );
@@ -89,7 +89,7 @@
* @return @c true if the pixel (x, y) is within the globe
* @c false if the pixel (x, y) is outside the globe, i.e. in space.
*/
- bool geoCoordinates( int x, int y,
+ bool geoCoordinates( const int x, const int y,
const ViewportParams *params,
qreal& lon, qreal& lat,
GeoDataCoordinates::Unit unit = GeoDataCoordinates::Degree );
--- branches/KDE/4.3/kdeedu/marble/src/lib/Projections/MercatorProjection.cpp #998455:998456
@@ -52,12 +52,13 @@
return -85.05113 * DEG2RAD;
}
-bool MercatorProjection::screenCoordinates( qreal lon, qreal lat,
+bool MercatorProjection::screenCoordinates( const qreal lon, const qreal _lat,
const ViewportParams *viewport,
qreal& x, qreal& y )
{
bool retval = true;
-
+ qreal lat = _lat;
+
if ( lat > maxLat() ) {
lat = maxLat();
retval = false;
@@ -235,7 +236,7 @@
}
-bool MercatorProjection::geoCoordinates( int x, int y,
+bool MercatorProjection::geoCoordinates( const int x, const int y,
const ViewportParams *viewport,
qreal& lon, qreal& lat,
GeoDataCoordinates::Unit unit )
--- branches/KDE/4.3/kdeedu/marble/src/lib/Projections/MercatorProjection.h #998455:998456
@@ -88,7 +88,7 @@
* @return @c true if the pixel (x, y) is within the globe
* @c false if the pixel (x, y) is outside the globe, i.e. in space.
*/
- bool geoCoordinates( int x, int y,
+ bool geoCoordinates( const int x, const int y,
const ViewportParams *params,
qreal& lon, qreal& lat,
GeoDataCoordinates::Unit = GeoDataCoordinates::Degree );
--- branches/KDE/4.3/kdeedu/marble/src/lib/Projections/SphericalProjection.cpp #998455:998456
@@ -62,7 +62,7 @@
return -90.0 * DEG2RAD;
}
-bool SphericalProjection::screenCoordinates( qreal lon, qreal lat,
+bool SphericalProjection::screenCoordinates( const qreal lon, const qreal lat,
const ViewportParams *viewport,
qreal& x, qreal& y )
{
@@ -181,7 +181,7 @@
}
-bool SphericalProjection::geoCoordinates( int x, int y,
+bool SphericalProjection::geoCoordinates( const int x, const int y,
const ViewportParams *viewport,
qreal& lon, qreal& lat,
GeoDataCoordinates::Unit unit )
--- branches/KDE/4.3/kdeedu/marble/src/lib/Projections/SphericalProjection.h #998455:998456
@@ -65,7 +65,7 @@
* @return @c true if the geographical coordinates are visible on the screen
* @c false if the geographical coordinates are not visible on the screen
*/
- bool screenCoordinates( qreal lon, qreal lat,
+ bool screenCoordinates( const qreal lon, const qreal lat,
const ViewportParams *params,
qreal& x, qreal& y );
@@ -88,23 +88,11 @@
* @return @c true if the pixel (x, y) is within the globe
* @c false if the pixel (x, y) is outside the globe, i.e. in space.
*/
- bool geoCoordinates( int x, int y,
+ bool geoCoordinates( const int x, const int y,
const ViewportParams *params,
qreal& lon, qreal& lat,
GeoDataCoordinates::Unit unit = GeoDataCoordinates::Degree );
- /**
- * @brief Get a quaternion representing a point on the earth corresponding to a pixel in the map.
- * @param x the x coordinate of the pixel
- * @param y the y coordinate of the pixel
- * @param q the out parameter where the result is returned
- * @return @c true if the pixel (x, y) is within the globe
- * @c false if the pixel (x, y) is outside the globe, i.e. in space
- */
- bool geoCoordinates( int x, int y,
- const ViewportParams *params,
- Quaternion &q );
-
GeoDataLatLonAltBox latLonAltBox( const QRect& screenRect,
const ViewportParams *viewport );
More information about the Marble-commits
mailing list