Marble

AzimuthalEquidistantProjection.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2013 Bernhard Beschow <[email protected]>
4 //
5 
6 
7 #ifndef MARBLE_AZIMUTHALEQUIDISTANTPROJECTION_H
8 #define MARBLE_AZIMUTHALEQUIDISTANTPROJECTION_H
9 
10 
11 #include "AbstractProjection.h"
12 #include "AzimuthalProjection.h"
13 
14 namespace Marble
15 {
16 
17 class AzimuthalEquidistantProjectionPrivate;
18 
19 /**
20  * @short A class to implement the spherical projection used by the "Globe" view.
21  */
22 
24 {
25  // Not a QObject so far because we don't need to send signals.
26  public:
27 
28  /**
29  * @brief Construct a new AzimuthalEquidistantProjection.
30  */
32 
34 
35  /**
36  * @brief Returns the user-visible name of the projection.
37  */
38  QString name() const override;
39 
40  /**
41  * @brief Returns a short user description of the projection
42  * that can be used in tooltips or dialogs.
43  */
44  QString description() const override;
45 
46  /**
47  * @brief Returns an icon for the projection.
48  */
49  QIcon icon() const override;
50 
51 
52  qreal clippingRadius() const override;
53 
54  /**
55  * @brief Get the screen coordinates corresponding to geographical coordinates in the map.
56  * @param coordinates the coordinates of the requested pixel position
57  * @param params the viewport parameters
58  * @param x the x coordinate of the pixel is returned through this parameter
59  * @param y the y coordinate of the pixel is returned through this parameter
60  * @param globeHidesPoint whether the globe hides the point
61  * @return @c true if the geographical coordinates are visible on the screen
62  * @c false if the geographical coordinates are not visible on the screen
63  */
64  bool screenCoordinates( const GeoDataCoordinates &coordinates,
65  const ViewportParams *params,
66  qreal &x, qreal &y, bool &globeHidesPoint ) const override;
67 
68  bool screenCoordinates( const GeoDataCoordinates &coordinates,
69  const ViewportParams * viewport,
70  qreal *x, qreal &y, int &pointRepeatNum,
71  const QSizeF& size,
72  bool &globeHidesPoint ) const override;
73 
75 
76  /**
77  * @brief Get the earth coordinates corresponding to a pixel in the map.
78  * @param x the x coordinate of the pixel
79  * @param y the y coordinate of the pixel
80  * @param params parameters of the viewport
81  * @param lon the longitude angle is returned through this parameter
82  * @param lat the latitude angle is returned through this parameter
83  * @param unit the unit
84  * @return @c true if the pixel (x, y) is within the globe
85  * @c false if the pixel (x, y) is outside the globe, i.e. in space.
86  */
87  bool geoCoordinates( const int x, const int y,
88  const ViewportParams *params,
89  qreal& lon, qreal& lat,
90  GeoDataCoordinates::Unit unit = GeoDataCoordinates::Degree ) const override;
91 
92  protected:
93  explicit AzimuthalEquidistantProjection(AzimuthalEquidistantProjectionPrivate *dd );
94 
95  private:
96  Q_DECLARE_PRIVATE(AzimuthalEquidistantProjection)
97  Q_DISABLE_COPY( AzimuthalEquidistantProjection )
98 };
99 
100 }
101 
102 #endif
A 3d point representation.
QString name() const override
Returns the user-visible name of the projection.
bool screenCoordinates(const GeoDataCoordinates &coordinates, const ViewportParams *params, qreal &x, qreal &y, bool &globeHidesPoint) const override
Get the screen coordinates corresponding to geographical coordinates in the map.
A base class for the Gnomonic and Orthographic (Globe) projections in Marble.
bool geoCoordinates(const int x, const int y, const ViewportParams *params, qreal &lon, qreal &lat, GeoDataCoordinates::Unit unit=GeoDataCoordinates::Degree) const override
Get the earth coordinates corresponding to a pixel in the map.
QString description() const override
Returns a short user description of the projection that can be used in tooltips or dialogs.
A public class that controls what is visible in the viewport of a Marble map.
A class to implement the spherical projection used by the "Globe" view.
AzimuthalEquidistantProjection()
Construct a new AzimuthalEquidistantProjection.
Binds a QML item to a specific geodetic location in screen coordinates.
bool screenCoordinates(const qreal lon, const qreal lat, const ViewportParams *viewport, qreal &x, qreal &y) const
Get the screen coordinates corresponding to geographical coordinates in the map.
Unit
enum used constructor to specify the units used
QIcon icon() const override
Returns an icon for the projection.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Sep 27 2023 04:09:05 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.