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

KDE's Doxygen guidelines are available online.