Marble

GeoDataLod.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2009 Torsten Rahn <tackat@kde.org>
4//
5
6#ifndef MARBLE_GEODATALOD_H
7#define MARBLE_GEODATALOD_H
8
9#include "GeoDataObject.h"
10
11namespace Marble
12{
13
14class GeoDataLodPrivate;
15
16/*!
17 \class GeoDataLod
18 \brief The level of detail which indicates visibility and importance.
19
20 GeoDataLod is a tool class that implements the Lod tag/class
21 of the Open Geospatial Consortium standard KML 2.2.
22
23 "Lod" is an abbreviation for "Level of Detail" and refers to
24 the extent of the region of a feature.
25 In geodesic coordinates the size of the region can be described
26 in terms of a LatLon(Alt)Box.
27 Projected to screen coordinates the size of a region would naturally
28 be measured in pixels.
29 The size of such a region varies depending on the distance of the
30 observer towards the feature.
31
32 The "Level of Detail" describes how many pixels a region needs to
33 cover in order to be considered "active" and visible.
34 It also describes how "quickly" the feature fades in and out.
35*/
36
37class GEODATA_EXPORT GeoDataLod : public GeoDataObject
38{
39public:
40 /*!
41 \brief Creates a new Level of Detail object.
42 */
43 GeoDataLod();
44
45 /*!
46 \brief Creates a new Level of Detail object as a copy of @p other.
47 */
48 GeoDataLod(const GeoDataLod &other);
49
50 /*!
51 \brief Destroys a Level of Detail object.
52 */
53 ~GeoDataLod() override;
54
55 /*!
56 \brief Provides type information for downcasting a GeoNode
57 */
58
59 bool operator==(const GeoDataLod &other) const;
60 bool operator!=(const GeoDataLod &other) const;
61
62 const char *nodeType() const override;
63
64 /*!
65 \brief Returns the minimum size that is needed for the region to be active
66 Returns the minimum number of pixels the region has to be projected on for
67 the feature to be considered active.
68 A value of 0 would mean no minimum number of pixels which is also the
69 standard value.
70 */
71 qreal minLodPixels() const;
72
73 /*!
74 \brief Sets the minimum size that is needed for the region to be active
75 Sets the minimum number of \a pixels the region has to be projected on for
76 the feature to be considered active.
77 */
78 void setMinLodPixels(qreal pixels);
79
80 /*!
81 \brief Returns the maximum size that is needed for the region to be active
82 Returns the maximum number of pixels the region has to be projected on for
83 the feature to be considered active.
84 A value of -1 would mean no minimum number of pixels which is also the
85 standard value.
86 */
87 qreal maxLodPixels() const;
88
89 /*!
90 \brief Sets the maximum size that is needed for the region to be active
91 Sets the maximum number of \a pixels the region has to be projected on for
92 the feature to be considered active.
93 */
94 void setMaxLodPixels(qreal pixels);
95
96 /*!
97 \brief Returns how "quickly" the region fades when the region is far away.
98 Returns the distance (counted from minLodPixels) over which the feature
99 fades in or out.
100 */
101 qreal minFadeExtent() const;
102
103 /*!
104 \brief Sets how "quickly" the region fades when the region is far away.
105 Sets the distance (counted from minLodPixels) over which the feature fades
106 in or out.
107 */
108 void setMinFadeExtent(qreal pixels);
109
110 /*!
111 \brief Returns how "quickly" the region fades when the region is near.
112 Returns the distance (counted from maxLodPixels) over which the feature
113 fades in or out.
114 */
115 qreal maxFadeExtent() const;
116
117 /*!
118 \brief Sets how "quickly" the region fades when the region is near.
119 Sets the distance (counted from maxLodPixels) over which the feature fades
120 in or out.
121 */
122 void setMaxFadeExtent(qreal pixels);
123
124 // Serialization
125 /*!
126 \brief Serialize the Lod to a stream.
127 \param stream the stream.
128 */
129 void pack(QDataStream &stream) const override;
130
131 /*!
132 \brief Unserialize the Lod from a stream.
133 \param stream the stream.
134 */
135 void unpack(QDataStream &stream) override;
136
137 GeoDataLod &operator=(const GeoDataLod &other);
138
139protected:
140 GeoDataLodPrivate *const d;
141};
142
143}
144
145#endif
The level of detail which indicates visibility and importance.
Definition GeoDataLod.h:38
A base class for all geodata objects.
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 Mon Nov 4 2024 16:37:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.