• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • marble
  • projections
CylindricalProjection.cpp
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2007 Inge Wallin <ingwa@kde.org>
9 // Copyright 2007-2012 Torsten Rahn <rahn@kde.org>
10 // Copyright 2012 Cezar Mocan <mocancezar@gmail.com>
11 //
12 
13 // Local
14 #include "CylindricalProjection.h"
15 
16 #include "CylindricalProjection_p.h"
17 
18 // Marble
19 #include "GeoDataLinearRing.h"
20 #include "GeoDataLineString.h"
21 #include "GeoDataCoordinates.h"
22 #include "ViewportParams.h"
23 
24 // Maximum amount of nodes that are created automatically between actual nodes.
25 static const int maxTessellationNodes = 200;
26 
27 namespace Marble {
28 
29 CylindricalProjection::CylindricalProjection()
30  : AbstractProjection( new CylindricalProjectionPrivate( this ) )
31 {
32 }
33 
34 CylindricalProjection::CylindricalProjection( CylindricalProjectionPrivate* dd )
35  : AbstractProjection( dd )
36 {
37 }
38 
39 CylindricalProjection::~CylindricalProjection()
40 {
41 }
42 
43 CylindricalProjectionPrivate::CylindricalProjectionPrivate( CylindricalProjection * parent )
44  : AbstractProjectionPrivate( parent ),
45  q_ptr( parent )
46 {
47 
48 }
49 
50 
51 QPainterPath CylindricalProjection::mapShape( const ViewportParams *viewport ) const
52 {
53  // Convenience variables
54  int width = viewport->width();
55  int height = viewport->height();
56 
57  qreal yTop;
58  qreal yBottom;
59  qreal xDummy;
60 
61  // Get the top and bottom coordinates of the projected map.
62  screenCoordinates( 0.0, maxLat(), viewport, xDummy, yTop );
63  screenCoordinates( 0.0, minLat(), viewport, xDummy, yBottom );
64 
65  // Don't let the map area be outside the image
66  if ( yTop < 0 )
67  yTop = 0;
68  if ( yBottom > height )
69  yBottom = height;
70 
71  QPainterPath mapShape;
72  mapShape.addRect(
73  0,
74  yTop,
75  width,
76  yBottom - yTop );
77 
78  return mapShape;
79 }
80 
81 bool CylindricalProjection::screenCoordinates( const GeoDataLineString &lineString,
82  const ViewportParams *viewport,
83  QVector<QPolygonF *> &polygons ) const
84 {
85 
86  Q_D( const CylindricalProjection );
87  // Compare bounding box size of the line string with the angularResolution
88  // Immediately return if the latLonAltBox is smaller.
89  if ( !viewport->resolves( lineString.latLonAltBox() ) ) {
90  // mDebug() << "Object too small to be resolved";
91  return false;
92  }
93 
94  QVector<QPolygonF *> subPolygons;
95  d->lineStringToPolygon( lineString, viewport, subPolygons );
96 
97  polygons << subPolygons;
98  return polygons.isEmpty();
99 }
100 int CylindricalProjectionPrivate::tessellateLineSegment( const GeoDataCoordinates &aCoords,
101  qreal ax, qreal ay,
102  const GeoDataCoordinates &bCoords,
103  qreal bx, qreal by,
104  QVector<QPolygonF*> &polygons,
105  const ViewportParams *viewport,
106  TessellationFlags f,
107  int mirrorCount,
108  qreal repeatDistance) const
109 {
110  // We take the manhattan length as a distance approximation
111  // that can be too big by a factor of sqrt(2)
112  qreal distance = fabs((bx - ax)) + fabs((by - ay));
113 #ifdef SAFE_DISTANCE
114  // Interpolate additional nodes if the line segment that connects the
115  // current or previous nodes might cross the viewport.
116  // The latter can pretty safely be excluded for most projections if both points
117  // are located on the same side relative to the viewport boundaries and if they are
118  // located more than half the line segment distance away from the viewport.
119  const qreal safeDistance = - 0.5 * distance;
120  if ( !( bx < safeDistance && ax < safeDistance )
121  || !( by < safeDistance && ay < safeDistance )
122  || !( bx + safeDistance > viewport->width()
123  && ax + safeDistance > viewport->width() )
124  || !( by + safeDistance > viewport->height()
125  && ay + safeDistance > viewport->height() )
126  )
127  {
128 #endif
129  bool const smallScreen = MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen;
130  int const finalTessellationPrecision = smallScreen ? 3 * tessellationPrecision : tessellationPrecision;
131 
132  // Let the line segment follow the spherical surface
133  // if the distance between the previous point and the current point
134  // on screen is too big
135  if ( distance > finalTessellationPrecision ) {
136  const int tessellatedNodes = qMin<int>( distance / finalTessellationPrecision, maxTessellationNodes );
137 
138  mirrorCount = processTessellation( aCoords, bCoords,
139  tessellatedNodes,
140  polygons,
141  viewport,
142  f,
143  mirrorCount,
144  repeatDistance );
145  }
146  else {
147  mirrorCount = crossDateLine( aCoords, bCoords, bx, by, polygons, mirrorCount, repeatDistance );
148  }
149 #ifdef SAFE_DISTANCE
150  }
151 #endif
152  return mirrorCount;
153 }
154 
155 
156 int CylindricalProjectionPrivate::processTessellation( const GeoDataCoordinates &previousCoords,
157  const GeoDataCoordinates &currentCoords,
158  int tessellatedNodes,
159  QVector<QPolygonF*> &polygons,
160  const ViewportParams *viewport,
161  TessellationFlags f,
162  int mirrorCount,
163  qreal repeatDistance) const
164 {
165 
166  const bool clampToGround = f.testFlag( FollowGround );
167  const bool followLatitudeCircle = f.testFlag( RespectLatitudeCircle )
168  && previousCoords.latitude() == currentCoords.latitude();
169 
170  // Calculate steps for tessellation: lonDiff and altDiff
171  qreal lonDiff = 0.0;
172  if ( followLatitudeCircle ) {
173  const int previousSign = previousCoords.longitude() > 0 ? 1 : -1;
174  const int currentSign = currentCoords.longitude() > 0 ? 1 : -1;
175 
176  lonDiff = currentCoords.longitude() - previousCoords.longitude();
177  if ( previousSign != currentSign
178  && fabs(previousCoords.longitude()) + fabs(currentCoords.longitude()) > M_PI ) {
179  if ( previousSign > currentSign ) {
180  // going eastwards ->
181  lonDiff += 2 * M_PI ;
182  } else {
183  // going westwards ->
184  lonDiff -= 2 * M_PI;
185  }
186  }
187  if ( fabs( lonDiff ) == 2 * M_PI ) {
188  return mirrorCount;
189  }
190  }
191 
192  const qreal altDiff = currentCoords.altitude() - previousCoords.altitude();
193 
194  // Create the tessellation nodes.
195  GeoDataCoordinates previousTessellatedCoords = previousCoords;
196  for ( int i = 1; i <= tessellatedNodes; ++i ) {
197  const qreal t = (qreal)(i) / (qreal)( tessellatedNodes + 1 );
198 
199  // interpolate the altitude, too
200  const qreal altitude = clampToGround ? 0 : altDiff * t + previousCoords.altitude();
201 
202  qreal lon = 0.0;
203  qreal lat = 0.0;
204  if ( followLatitudeCircle ) {
205  // To tessellate along latitude circles use the
206  // linear interpolation of the longitude.
207  lon = lonDiff * t + previousCoords.longitude();
208  lat = previousTessellatedCoords.latitude();
209  }
210  else {
211  // To tessellate along great circles use the
212  // normalized linear interpolation ("NLERP") for latitude and longitude.
213  const Quaternion itpos = Quaternion::nlerp( previousCoords.quaternion(), currentCoords.quaternion(), t );
214  itpos. getSpherical( lon, lat );
215  }
216 
217  const GeoDataCoordinates currentTessellatedCoords( lon, lat, altitude );
218  Q_Q(const CylindricalProjection);
219  qreal bx, by;
220  q->screenCoordinates( currentTessellatedCoords, viewport, bx, by );
221  mirrorCount = crossDateLine( previousTessellatedCoords, currentTessellatedCoords, bx, by, polygons,
222  mirrorCount, repeatDistance );
223  previousTessellatedCoords = currentTessellatedCoords;
224  }
225 
226  // For the clampToGround case add the "current" coordinate after adding all other nodes.
227  GeoDataCoordinates currentModifiedCoords( currentCoords );
228  if ( clampToGround ) {
229  currentModifiedCoords.setAltitude( 0.0 );
230  }
231  Q_Q(const CylindricalProjection);
232  qreal bx, by;
233  q->screenCoordinates( currentModifiedCoords, viewport, bx, by );
234  mirrorCount = crossDateLine( previousTessellatedCoords, currentModifiedCoords, bx, by, polygons,
235  mirrorCount, repeatDistance );
236  return mirrorCount;
237 }
238 
239 int CylindricalProjectionPrivate::crossDateLine( const GeoDataCoordinates & aCoord,
240  const GeoDataCoordinates & bCoord,
241  qreal bx,
242  qreal by,
243  QVector<QPolygonF*> &polygons,
244  int mirrorCount,
245  qreal repeatDistance )
246 {
247  qreal aLon = aCoord.longitude();
248  qreal aSign = aLon > 0 ? 1 : -1;
249 
250  qreal bLon = bCoord.longitude();
251  qreal bSign = bLon > 0 ? 1 : -1;
252 
253  qreal delta = 0;
254  if( aSign != bSign && fabs(aLon) + fabs(bLon) > M_PI ) {
255  int sign = aSign > bSign ? 1 : -1;
256  mirrorCount += sign;
257  }
258  delta = repeatDistance * mirrorCount;
259  *polygons.last() << QPointF( bx + delta, by );
260 
261  return mirrorCount;
262 }
263 
264 bool CylindricalProjectionPrivate::lineStringToPolygon( const GeoDataLineString &lineString,
265  const ViewportParams *viewport,
266  QVector<QPolygonF *> &polygons ) const
267 {
268  const TessellationFlags f = lineString.tessellationFlags();
269 
270  qreal x = 0;
271  qreal y = 0;
272 
273  qreal previousX = -1.0;
274  qreal previousY = -1.0;
275 
276  int mirrorCount = 0;
277  qreal distance = repeatDistance( viewport );
278 
279  polygons.append( new QPolygonF );
280 
281  GeoDataLineString::ConstIterator itCoords = lineString.constBegin();
282  GeoDataLineString::ConstIterator itPreviousCoords = lineString.constBegin();
283 
284  GeoDataLineString::ConstIterator itBegin = lineString.constBegin();
285  GeoDataLineString::ConstIterator itEnd = lineString.constEnd();
286 
287  bool processingLastNode = false;
288 
289  // We use a while loop to be able to cover linestrings as well as linear rings:
290  // Linear rings require to tessellate the path from the last node to the first node
291  // which isn't really convenient to achieve with a for loop ...
292 
293  const bool isLong = lineString.size() > 50;
294  const int maximumDetail = ( viewport->radius() > 5000 ) ? 5 :
295  ( viewport->radius() > 2500 ) ? 4 :
296  ( viewport->radius() > 1000 ) ? 3 :
297  ( viewport->radius() > 600 ) ? 2 :
298  ( viewport->radius() > 50 ) ? 1 :
299  0;
300 
301  while ( itCoords != itEnd )
302  {
303 
304  // Optimization for line strings with a big amount of nodes
305  bool skipNode = itCoords != itBegin && isLong && !processingLastNode &&
306  ( (*itCoords).detail() > maximumDetail
307  || viewport->resolves( *itPreviousCoords, *itCoords ) );
308 
309  if ( !skipNode ) {
310 
311 
312  Q_Q( const CylindricalProjection );
313 
314  q->screenCoordinates( *itCoords, viewport, x, y );
315 
316  // Initializing variables that store the values of the previous iteration
317  if ( !processingLastNode && itCoords == itBegin ) {
318  itPreviousCoords = itCoords;
319  previousX = x;
320  previousY = y;
321  }
322 
323  // This if-clause contains the section that tessellates the line
324  // segments of a linestring. If you are about to learn how the code of
325  // this class works you can safely ignore this section for a start.
326 
327  if ( lineString.tessellate() ) {
328 
329  mirrorCount = tessellateLineSegment( *itPreviousCoords, previousX, previousY,
330  *itCoords, x, y,
331  polygons, viewport,
332  f, mirrorCount, distance );
333  }
334 
335  else {
336  // special case for polys which cross dateline but have no Tesselation Flag
337  // the expected rendering is a screen coordinates straight line between
338  // points, but in projections with repeatX things are not smooth
339  mirrorCount = crossDateLine( *itPreviousCoords, *itCoords, x, y, polygons, mirrorCount, distance );
340  }
341 
342  itPreviousCoords = itCoords;
343  previousX = x;
344  previousY = y;
345  }
346 
347  // Here we modify the condition to be able to process the
348  // first node after the last node in a LinearRing.
349 
350  if ( processingLastNode ) {
351  break;
352  }
353  ++itCoords;
354 
355  if ( itCoords == itEnd && lineString.isClosed() ) {
356  itCoords = itBegin;
357  processingLastNode = true;
358  }
359  }
360 
361  GeoDataLatLonAltBox box = lineString.latLonAltBox();
362  if( lineString.isClosed() && box.width() == 2*M_PI ) {
363  QPolygonF *poly = polygons.last();
364  if( box.containsPole( NorthPole ) ) {
365  poly->push_front( QPointF( poly->first().x(), 0 ) );
366  poly->push_back( QPointF( poly->last().x(), 0 ) );
367  poly->push_back( QPointF( poly->first().x(), 0 ) );
368  } else {
369  poly->push_front( QPointF( poly->first().x(), viewport->height() ) );
370  poly->push_back( QPointF( poly->last().x(), viewport->height() ) );
371  poly->push_back( QPointF( poly->first().x(), viewport->height() ) );
372  }
373  }
374 
375  repeatPolygons( viewport, polygons );
376 
377  return polygons.isEmpty();
378 }
379 
380 void CylindricalProjectionPrivate::translatePolygons( const QVector<QPolygonF *> &polygons,
381  QVector<QPolygonF *> &translatedPolygons,
382  qreal xOffset )
383 {
384  // mDebug() << "Translation: " << xOffset;
385 
386  QVector<QPolygonF *>::const_iterator itPolygon = polygons.constBegin();
387  QVector<QPolygonF *>::const_iterator itEnd = polygons.constEnd();
388 
389  for( ; itPolygon != itEnd; ++itPolygon ) {
390  QPolygonF * polygon = new QPolygonF;
391  *polygon = **itPolygon;
392  polygon->translate( xOffset, 0 );
393  translatedPolygons.append( polygon );
394  }
395 }
396 
397 void CylindricalProjectionPrivate::repeatPolygons( const ViewportParams *viewport,
398  QVector<QPolygonF *> &polygons ) const
399 {
400  Q_Q( const CylindricalProjection );
401 
402  qreal xEast = 0;
403  qreal xWest = 0;
404  qreal y = 0;
405 
406  // Choose a latitude that is inside the viewport.
407  qreal centerLatitude = viewport->viewLatLonAltBox().center().latitude();
408 
409  GeoDataCoordinates westCoords( -M_PI, centerLatitude );
410  GeoDataCoordinates eastCoords( +M_PI, centerLatitude );
411 
412  q->screenCoordinates( westCoords, viewport, xWest, y );
413  q->screenCoordinates( eastCoords, viewport, xEast, y );
414 
415  if ( xWest <= 0 && xEast >= viewport->width() - 1 ) {
416  // mDebug() << "No repeats";
417  return;
418  }
419 
420  qreal repeatXInterval = xEast - xWest;
421 
422  qreal repeatsLeft = 0;
423  qreal repeatsRight = 0;
424 
425  if ( xWest > 0 ) {
426  repeatsLeft = (int)( xWest / repeatXInterval ) + 1;
427  }
428  if ( xEast < viewport->width() ) {
429  repeatsRight = (int)( ( viewport->width() - xEast ) / repeatXInterval ) + 1;
430  }
431 
432  QVector<QPolygonF *> repeatedPolygons;
433  QVector<QPolygonF *> translatedPolygons;
434 
435  qreal xOffset = 0;
436  qreal it = repeatsLeft;
437 
438  while ( it > 0 ) {
439  xOffset = -it * repeatXInterval;
440  translatePolygons( polygons, translatedPolygons, xOffset );
441  repeatedPolygons << translatedPolygons;
442  translatedPolygons.clear();
443  --it;
444  }
445 
446  repeatedPolygons << polygons;
447 
448  it = 1;
449 
450  while ( it <= repeatsRight ) {
451  xOffset = +it * repeatXInterval;
452  translatePolygons( polygons, translatedPolygons, xOffset );
453  repeatedPolygons << translatedPolygons;
454  translatedPolygons.clear();
455  ++it;
456  }
457 
458  polygons = repeatedPolygons;
459 
460  // mDebug() << Q_FUNC_INFO << "Coordinates: " << xWest << xEast
461  // << "Repeats: " << repeatsLeft << repeatsRight;
462 }
463 
464 qreal CylindricalProjectionPrivate::repeatDistance( const ViewportParams *viewport ) const
465 {
466  // Choose a latitude that is inside the viewport.
467  qreal centerLatitude = viewport->viewLatLonAltBox().center().latitude();
468 
469  GeoDataCoordinates westCoords( -M_PI, centerLatitude );
470  GeoDataCoordinates eastCoords( +M_PI, centerLatitude );
471  qreal xWest, xEast, dummyY;
472 
473  Q_Q( const AbstractProjection );
474 
475  q->screenCoordinates( westCoords, viewport, xWest, dummyY );
476  q->screenCoordinates( eastCoords, viewport, xEast, dummyY );
477 
478  return xEast - xWest;
479 }
480 
481 }
482 
GeoDataCoordinates.h
Marble::CylindricalProjectionPrivate::lineStringToPolygon
bool lineStringToPolygon(const GeoDataLineString &lineString, const ViewportParams *viewport, QVector< QPolygonF * > &polygons) const
Definition: CylindricalProjection.cpp:264
Marble::AbstractProjectionPrivate
Definition: AbstractProjection_p.h:20
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
Marble::GeoDataLatLonBox::width
qreal width(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
Get the width of the longitude interval.
Definition: GeoDataLatLonBox.cpp:236
Marble::GeoDataLineString::constEnd
QVector< GeoDataCoordinates >::ConstIterator constEnd() const
Returns a const iterator that points to the end of the LineString.
Definition: GeoDataLineString.cpp:220
maxTessellationNodes
static const int maxTessellationNodes
Definition: CylindricalProjection.cpp:25
Marble::GeoDataCoordinates::setAltitude
void setAltitude(const qreal altitude)
set the altitude of the Point in meters
Definition: GeoDataCoordinates.cpp:1191
QVector::append
void append(const T &value)
Marble::GeoDataLineString::size
int size() const
Returns the number of nodes in a LineString.
Definition: GeoDataLineString.cpp:138
Marble::CylindricalProjectionPrivate
Definition: CylindricalProjection_p.h:23
QVector::constEnd
const_iterator constEnd() const
QVector::last
T & last()
Marble::ViewportParams::viewLatLonAltBox
const GeoDataLatLonAltBox & viewLatLonAltBox() const
Definition: ViewportParams.cpp:305
Marble::CylindricalProjectionPrivate::repeatPolygons
void repeatPolygons(const ViewportParams *viewport, QVector< QPolygonF * > &polygons) const
Definition: CylindricalProjection.cpp:397
Marble::CylindricalProjectionPrivate::translatePolygons
static void translatePolygons(const QVector< QPolygonF * > &polygons, QVector< QPolygonF * > &translatedPolygons, qreal xOffset)
Definition: CylindricalProjection.cpp:380
Marble::AbstractProjection::maxLat
qreal maxLat() const
Definition: AbstractProjection.cpp:54
QVector::first
T & first()
Marble::GeoDataCoordinates::latitude
qreal latitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the latitude of the GeoDataCoordinates object use the unit parameter to switch between Radi...
Definition: GeoDataCoordinates.cpp:751
Marble::Quaternion::nlerp
static Quaternion nlerp(const Quaternion &q1, const Quaternion &q2, qreal t)
Definition: Quaternion.cpp:231
Marble::GeoDataLineString::ConstIterator
QVector< GeoDataCoordinates >::ConstIterator ConstIterator
Definition: GeoDataLineString.h:80
Marble::GeoDataLineString::tessellationFlags
TessellationFlags tessellationFlags() const
Returns the tessellation flags for a LineString.
Definition: GeoDataLineString.cpp:337
Marble::ViewportParams::height
int height() const
Definition: ViewportParams.cpp:255
Marble::GeoDataLineString::isClosed
virtual bool isClosed() const
Returns whether a LineString is a closed polygon.
Definition: GeoDataLineString.cpp:310
QPointF
Marble::CylindricalProjectionPrivate::repeatDistance
qreal repeatDistance(const ViewportParams *viewport) const
Definition: CylindricalProjection.cpp:464
Marble::GeoDataCoordinates::altitude
qreal altitude() const
return the altitude of the Point in meters
Definition: GeoDataCoordinates.cpp:1197
QVector::clear
void clear()
Marble::CylindricalProjection
A base class for the Equirectangular and Mercator projections in Marble.
Definition: CylindricalProjection.h:33
Marble::CylindricalProjectionPrivate::crossDateLine
static int crossDateLine(const GeoDataCoordinates &aCoord, const GeoDataCoordinates &bCoord, qreal bx, qreal by, QVector< QPolygonF * > &polygons, int mirrorCount=0, qreal repeatDistance=0)
Definition: CylindricalProjection.cpp:239
Marble::ViewportParams::width
int width() const
Definition: ViewportParams.cpp:250
Marble::tessellationPrecision
static const int tessellationPrecision
Definition: AbstractProjection.h:37
Marble::CylindricalProjection::screenCoordinates
virtual bool screenCoordinates(const GeoDataLineString &lineString, const ViewportParams *viewport, QVector< QPolygonF * > &polygons) const
Definition: CylindricalProjection.cpp:81
Marble::CylindricalProjectionPrivate::tessellateLineSegment
int tessellateLineSegment(const GeoDataCoordinates &aCoords, qreal ax, qreal ay, const GeoDataCoordinates &bCoords, qreal bx, qreal by, QVector< QPolygonF * > &polygons, const ViewportParams *viewport, TessellationFlags f=0, int mirrorCount=0, qreal repeatDistance=0) const
Definition: CylindricalProjection.cpp:100
QPainterPath::addRect
void addRect(const QRectF &rectangle)
GeoDataLineString.h
CylindricalProjection_p.h
QPolygonF::translate
void translate(qreal dx, qreal dy)
Marble::GeoDataLineString
A LineString that allows to store a contiguous set of line segments.
Definition: GeoDataLineString.h:75
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
Marble::CylindricalProjectionPrivate::processTessellation
int processTessellation(const GeoDataCoordinates &previousCoords, const GeoDataCoordinates &currentCoords, int count, QVector< QPolygonF * > &polygons, const ViewportParams *viewport, TessellationFlags f=0, int mirrorCount=0, qreal repeatDistance=0) const
Definition: CylindricalProjection.cpp:156
Marble::GeoDataCoordinates::longitude
qreal longitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the longitude of the GeoDataCoordinates object use the unit parameter to switch between Rad...
Definition: GeoDataCoordinates.cpp:739
Marble::CylindricalProjection::~CylindricalProjection
virtual ~CylindricalProjection()
Definition: CylindricalProjection.cpp:39
Marble::GeoDataLatLonAltBox::center
virtual GeoDataCoordinates center() const
returns the center of this box
Definition: GeoDataLatLonAltBox.cpp:151
GeoDataLinearRing.h
ViewportParams.h
This file contains the headers for ViewportParams.
Marble::CylindricalProjectionPrivate::CylindricalProjectionPrivate
CylindricalProjectionPrivate(CylindricalProjection *parent)
Definition: CylindricalProjection.cpp:43
Marble::MarbleGlobal::SmallScreen
Definition: MarbleGlobal.h:287
Marble::MarbleGlobal::getInstance
static MarbleGlobal * getInstance()
Definition: MarbleGlobal.cpp:37
Marble::RespectLatitudeCircle
Definition: MarbleGlobal.h:33
CylindricalProjection.h
This file contains the headers for CylindricalProjection.
QVector::constBegin
const_iterator constBegin() const
QPainterPath
QVector
Marble::ViewportParams::radius
int radius() const
Definition: ViewportParams.cpp:195
Marble::GeoDataLineString::constBegin
QVector< GeoDataCoordinates >::ConstIterator constBegin() const
Returns a const iterator that points to the begin of the LineString.
Definition: GeoDataLineString.cpp:215
QVector::isEmpty
bool isEmpty() const
Marble::Quaternion
Definition: Quaternion.h:41
Marble::AbstractProjection
A base class for all projections in Marble.
Definition: AbstractProjection.h:49
Marble::ViewportParams::resolves
bool resolves(const GeoDataLatLonBox &latLonBox) const
Definition: ViewportParams.cpp:330
Marble::MarbleGlobal::profiles
Profiles profiles() const
Definition: MarbleGlobal.cpp:48
Marble::CylindricalProjection::CylindricalProjection
CylindricalProjection()
Definition: CylindricalProjection.cpp:29
M_PI
#define M_PI
Definition: GeoDataCoordinates.h:26
QVector::push_front
void push_front(const T &value)
QVector::push_back
void push_back(const T &value)
Marble::GeoDataLatLonBox::containsPole
bool containsPole(Pole pole=AnyPole) const
Detect whether the bounding box contains one of the poles.
Definition: GeoDataLatLonBox.cpp:289
Marble::FollowGround
Definition: MarbleGlobal.h:34
Marble::CylindricalProjection::mapShape
virtual QPainterPath mapShape(const ViewportParams *viewport) const
Definition: CylindricalProjection.cpp:51
Marble::AbstractProjection::minLat
qreal minLat() const
Definition: AbstractProjection.cpp:76
Marble::NorthPole
Only North Pole.
Definition: MarbleGlobal.h:157
Marble::GeoDataLatLonAltBox
A class that defines a 3D bounding box for geographic data.
Definition: GeoDataLatLonAltBox.h:49
Marble::GeoDataLineString::latLonAltBox
virtual const GeoDataLatLonAltBox & latLonAltBox() const
Returns the smallest latLonAltBox that contains the LineString.
Definition: GeoDataLineString.cpp:580
Marble::GeoDataLineString::tessellate
bool tessellate() const
Returns whether the LineString follows the earth's surface.
Definition: GeoDataLineString.cpp:315
Marble::GeoDataCoordinates::quaternion
const Quaternion & quaternion() const
return a Quaternion with the used coordinates
Definition: GeoDataCoordinates.cpp:1236
QPolygonF
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:38 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal