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

marble

  • sources
  • kde-4.12
  • 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 ) const
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  int sign = 0;
254  qreal delta = 0;
255  if( aSign != bSign && fabs(aLon) + fabs(bLon) > M_PI ) {
256  sign = aSign > bSign ? 1 : -1;
257  mirrorCount += sign;
258  }
259  delta = repeatDistance * mirrorCount;
260  *polygons.last() << QPointF( bx + delta, by );
261 
262  return mirrorCount;
263 }
264 
265 bool CylindricalProjectionPrivate::lineStringToPolygon( const GeoDataLineString &lineString,
266  const ViewportParams *viewport,
267  QVector<QPolygonF *> &polygons ) const
268 {
269  const TessellationFlags f = lineString.tessellationFlags();
270 
271  qreal x = 0;
272  qreal y = 0;
273 
274  qreal previousX = -1.0;
275  qreal previousY = -1.0;
276 
277  int mirrorCount = 0;
278  qreal distance = repeatDistance( viewport );
279 
280  polygons.append( new QPolygonF );
281 
282  GeoDataLineString::ConstIterator itCoords = lineString.constBegin();
283  GeoDataLineString::ConstIterator itPreviousCoords = lineString.constBegin();
284 
285  GeoDataLineString::ConstIterator itBegin = lineString.constBegin();
286  GeoDataLineString::ConstIterator itEnd = lineString.constEnd();
287 
288  bool processingLastNode = false;
289 
290  // We use a while loop to be able to cover linestrings as well as linear rings:
291  // Linear rings require to tessellate the path from the last node to the first node
292  // which isn't really convenient to achieve with a for loop ...
293 
294  const bool isLong = lineString.size() > 50;
295  const int maximumDetail = ( viewport->radius() > 5000 ) ? 5 :
296  ( viewport->radius() > 2500 ) ? 4 :
297  ( viewport->radius() > 1000 ) ? 3 :
298  ( viewport->radius() > 600 ) ? 2 :
299  ( viewport->radius() > 50 ) ? 1 :
300  0;
301 
302  while ( itCoords != itEnd )
303  {
304 
305  // Optimization for line strings with a big amount of nodes
306  bool skipNode = itCoords != itBegin && isLong && !processingLastNode &&
307  ( (*itCoords).detail() > maximumDetail
308  || viewport->resolves( *itPreviousCoords, *itCoords ) );
309 
310  if ( !skipNode ) {
311 
312 
313  Q_Q( const CylindricalProjection );
314 
315  q->screenCoordinates( *itCoords, viewport, x, y );
316 
317  // Initializing variables that store the values of the previous iteration
318  if ( !processingLastNode && itCoords == itBegin ) {
319  itPreviousCoords = itCoords;
320  previousX = x;
321  previousY = y;
322  }
323 
324  // This if-clause contains the section that tessellates the line
325  // segments of a linestring. If you are about to learn how the code of
326  // this class works you can safely ignore this section for a start.
327 
328  if ( lineString.tessellate() ) {
329 
330  mirrorCount = tessellateLineSegment( *itPreviousCoords, previousX, previousY,
331  *itCoords, x, y,
332  polygons, viewport,
333  f, mirrorCount, distance );
334  }
335 
336  else {
337  // special case for polys which cross dateline but have no Tesselation Flag
338  // the expected rendering is a screen coordinates straight line between
339  // points, but in projections with repeatX things are not smooth
340  mirrorCount = crossDateLine( *itPreviousCoords, *itCoords, x, y, polygons, mirrorCount, distance );
341  }
342 
343  itPreviousCoords = itCoords;
344  previousX = x;
345  previousY = y;
346  }
347 
348  // Here we modify the condition to be able to process the
349  // first node after the last node in a LinearRing.
350 
351  if ( processingLastNode ) {
352  break;
353  }
354  ++itCoords;
355 
356  if ( itCoords == itEnd && lineString.isClosed() ) {
357  itCoords = itBegin;
358  processingLastNode = true;
359  }
360  }
361 
362  GeoDataLatLonAltBox box = lineString.latLonAltBox();
363  if( lineString.isClosed() && box.width() == 2*M_PI ) {
364  QPolygonF *poly = polygons.last();
365  if( box.containsPole( NorthPole ) ) {
366  poly->push_front( QPointF( poly->first().x(), 0 ) );
367  poly->push_back( QPointF( poly->last().x(), 0 ) );
368  poly->push_back( QPointF( poly->first().x(), 0 ) );
369  } else {
370  poly->push_front( QPointF( poly->first().x(), viewport->height() ) );
371  poly->push_back( QPointF( poly->last().x(), viewport->height() ) );
372  poly->push_back( QPointF( poly->first().x(), viewport->height() ) );
373  }
374  }
375 
376  repeatPolygons( viewport, polygons );
377 
378  return polygons.isEmpty();
379 }
380 
381 void CylindricalProjectionPrivate::translatePolygons( const QVector<QPolygonF *> &polygons,
382  QVector<QPolygonF *> &translatedPolygons,
383  qreal xOffset ) const
384 {
385  // mDebug() << "Translation: " << xOffset;
386 
387  QVector<QPolygonF *>::const_iterator itPolygon = polygons.constBegin();
388  QVector<QPolygonF *>::const_iterator itEnd = polygons.constEnd();
389 
390  for( ; itPolygon != itEnd; ++itPolygon ) {
391  QPolygonF * polygon = new QPolygonF;
392  *polygon = **itPolygon;
393  polygon->translate( xOffset, 0 );
394  translatedPolygons.append( polygon );
395  }
396 }
397 
398 void CylindricalProjectionPrivate::repeatPolygons( const ViewportParams *viewport,
399  QVector<QPolygonF *> &polygons ) const
400 {
401  Q_Q( const CylindricalProjection );
402 
403  qreal xEast = 0;
404  qreal xWest = 0;
405  qreal y = 0;
406 
407  // Choose a latitude that is inside the viewport.
408  qreal centerLatitude = viewport->viewLatLonAltBox().center().latitude();
409 
410  GeoDataCoordinates westCoords( -M_PI, centerLatitude );
411  GeoDataCoordinates eastCoords( +M_PI, centerLatitude );
412 
413  q->screenCoordinates( westCoords, viewport, xWest, y );
414  q->screenCoordinates( eastCoords, viewport, xEast, y );
415 
416  if ( xWest <= 0 && xEast >= viewport->width() - 1 ) {
417  // mDebug() << "No repeats";
418  return;
419  }
420 
421  qreal repeatXInterval = xEast - xWest;
422 
423  qreal repeatsLeft = 0;
424  qreal repeatsRight = 0;
425 
426  if ( xWest > 0 ) {
427  repeatsLeft = (int)( xWest / repeatXInterval ) + 1;
428  }
429  if ( xEast < viewport->width() ) {
430  repeatsRight = (int)( ( viewport->width() - xEast ) / repeatXInterval ) + 1;
431  }
432 
433  QVector<QPolygonF *> repeatedPolygons;
434  QVector<QPolygonF *> translatedPolygons;
435 
436  qreal xOffset = 0;
437  qreal it = repeatsLeft;
438 
439  while ( it > 0 ) {
440  xOffset = -it * repeatXInterval;
441  translatePolygons( polygons, translatedPolygons, xOffset );
442  repeatedPolygons << translatedPolygons;
443  translatedPolygons.clear();
444  --it;
445  }
446 
447  repeatedPolygons << polygons;
448 
449  it = 1;
450 
451  while ( it <= repeatsRight ) {
452  xOffset = +it * repeatXInterval;
453  translatePolygons( polygons, translatedPolygons, xOffset );
454  repeatedPolygons << translatedPolygons;
455  translatedPolygons.clear();
456  ++it;
457  }
458 
459  polygons = repeatedPolygons;
460 
461  // mDebug() << Q_FUNC_INFO << "Coordinates: " << xWest << xEast
462  // << "Repeats: " << repeatsLeft << repeatsRight;
463 }
464 
465 qreal CylindricalProjectionPrivate::repeatDistance( const ViewportParams *viewport ) const
466 {
467  // Choose a latitude that is inside the viewport.
468  qreal centerLatitude = viewport->viewLatLonAltBox().center().latitude();
469 
470  GeoDataCoordinates westCoords( -M_PI, centerLatitude );
471  GeoDataCoordinates eastCoords( +M_PI, centerLatitude );
472  qreal xWest, xEast, dummyY;
473 
474  Q_Q( const AbstractProjection );
475 
476  q->screenCoordinates( westCoords, viewport, xWest, dummyY );
477  q->screenCoordinates( eastCoords, viewport, xEast, dummyY );
478 
479  return xEast - xWest;
480 }
481 
482 }
483 
GeoDataCoordinates.h
Marble::CylindricalProjectionPrivate::lineStringToPolygon
bool lineStringToPolygon(const GeoDataLineString &lineString, const ViewportParams *viewport, QVector< QPolygonF * > &polygons) const
Definition: CylindricalProjection.cpp:265
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:216
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
Marble::GeoDataLineString::size
int size() const
Returns the number of nodes in a LineString.
Definition: GeoDataLineString.cpp:134
Marble::CylindricalProjectionPrivate
Definition: CylindricalProjection_p.h:23
Marble::CylindricalProjectionPrivate::translatePolygons
void translatePolygons(const QVector< QPolygonF * > &polygons, QVector< QPolygonF * > &translatedPolygons, qreal xOffset) const
Definition: CylindricalProjection.cpp:381
Marble::CylindricalProjectionPrivate::crossDateLine
int crossDateLine(const GeoDataCoordinates &aCoord, const GeoDataCoordinates &bCoord, qreal bx, qreal by, QVector< QPolygonF * > &polygons, int mirrorCount=0, qreal repeatDistance=0) const
Definition: CylindricalProjection.cpp:239
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:398
Marble::AbstractProjection::maxLat
qreal maxLat() const
Definition: AbstractProjection.cpp:54
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:207
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:302
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:275
Marble::CylindricalProjectionPrivate::repeatDistance
qreal repeatDistance(const ViewportParams *viewport) const
Definition: CylindricalProjection.cpp:465
Marble::GeoDataCoordinates::altitude
qreal altitude() const
return the altitude of the Point in meters
Definition: GeoDataCoordinates.cpp:1197
Marble::CylindricalProjection
A base class for the Equirectangular and Mercator projections in Marble.
Definition: CylindricalProjection.h:33
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
GeoDataLineString.h
CylindricalProjection_p.h
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:152
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:268
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.
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:211
Marble::Quaternion
Definition: Quaternion.h:43
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
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:153
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:545
Marble::GeoDataLineString::tessellate
bool tessellate() const
Returns whether the LineString follows the earth's surface.
Definition: GeoDataLineString.cpp:280
Marble::GeoDataCoordinates::quaternion
const Quaternion & quaternion() const
return a Quaternion with the used coordinates
Definition: GeoDataCoordinates.cpp:1226
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:49 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
  • kstars
  • libkdeedu
  •   keduvocdocument
  • 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