Marble

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

KDE's Doxygen guidelines are available online.