• 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
SphericalProjection.h
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 //
11 
12 
13 #ifndef MARBLE_SPHERICALPROJECTION_H
14 #define MARBLE_SPHERICALPROJECTION_H
15 
16 
25 #include "AbstractProjection.h"
26 
27 namespace Marble
28 {
29 
30 class SphericalProjectionPrivate;
31 
36 class SphericalProjection : public AbstractProjection
37 {
38  // Not a QObject so far because we don't need to send signals.
39  public:
40 
44  SphericalProjection();
45 
46  virtual ~SphericalProjection();
47 
48  virtual bool repeatableX() const;
49  virtual qreal maxValidLat() const;
50  virtual qreal minValidLat() const;
51 
52  virtual bool traversablePoles() const { return true; }
53  virtual bool traversableDateLine() const { return true; }
54 
55  virtual SurfaceType surfaceType() const { return Azimuthal; }
56 
57  virtual PreservationType preservationType() const { return NoPreservation; }
58 
68  virtual bool screenCoordinates( const GeoDataCoordinates &coordinates,
69  const ViewportParams *params,
70  qreal &x, qreal &y, bool &globeHidesPoint ) const;
71 
72  virtual bool screenCoordinates( const GeoDataCoordinates &coordinates,
73  const ViewportParams * viewport,
74  qreal *x, qreal &y, int &pointRepeatNum,
75  const QSizeF& size,
76  bool &globeHidesPoint ) const;
77 
78  virtual bool screenCoordinates( const GeoDataLineString &lineString,
79  const ViewportParams *viewport,
80  QVector<QPolygonF*> &polygons ) const;
81 
82  using AbstractProjection::screenCoordinates;
83 
93  bool geoCoordinates( const int x, const int y,
94  const ViewportParams *params,
95  qreal& lon, qreal& lat,
96  GeoDataCoordinates::Unit unit = GeoDataCoordinates::Degree ) const;
97 
98  GeoDataLatLonAltBox latLonAltBox( const QRect& screenRect,
99  const ViewportParams *viewport ) const;
100 
101  bool mapCoversViewport( const ViewportParams *viewport ) const;
102 
103  virtual QPainterPath mapShape( const ViewportParams *viewport ) const;
104 
105  protected:
106  SphericalProjection(SphericalProjectionPrivate *dd );
107 
108  private:
109  Q_DECLARE_PRIVATE(SphericalProjection)
110  Q_DISABLE_COPY( SphericalProjection )
111 };
112 
113 }
114 
115 #endif
Marble::GeoDataCoordinates::Unit
Unit
enum used constructor to specify the units used
Definition: GeoDataCoordinates.h:64
Marble::SphericalProjection::screenCoordinates
virtual bool screenCoordinates(const GeoDataCoordinates &coordinates, const ViewportParams *params, qreal &x, qreal &y, bool &globeHidesPoint) const
Get the screen coordinates corresponding to geographical coordinates in the map.
Definition: SphericalProjection.cpp:135
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
Marble::AbstractProjection::NoPreservation
Definition: AbstractProjection.h:63
Marble::SphericalProjection::minValidLat
virtual qreal minValidLat() const
Definition: SphericalProjection.cpp:130
Marble::SphericalProjection::geoCoordinates
bool geoCoordinates(const int x, const int y, const ViewportParams *params, qreal &lon, qreal &lat, GeoDataCoordinates::Unit unit=GeoDataCoordinates::Degree) const
Get the earth coordinates corresponding to a pixel in the map.
Definition: SphericalProjection.cpp:207
Marble::GeoDataCoordinates::Degree
Definition: GeoDataCoordinates.h:66
AbstractProjection.h
This file contains the headers for AbstractProjection.
Marble::AbstractProjection::Azimuthal
Definition: AbstractProjection.h:59
QRect
Marble::SphericalProjection::traversablePoles
virtual bool traversablePoles() const
Definition: SphericalProjection.h:52
Marble::SphericalProjection::~SphericalProjection
virtual ~SphericalProjection()
Definition: SphericalProjection.cpp:108
Marble::SphericalProjection::maxValidLat
virtual qreal maxValidLat() const
Definition: SphericalProjection.cpp:125
Marble::SphericalProjection::SphericalProjection
SphericalProjection()
Construct a new SphericalProjection.
Definition: SphericalProjection.cpp:94
Marble::SphericalProjection
A class to implement the spherical projection used by the "Globe" view.
Definition: SphericalProjection.h:36
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::AbstractProjection::screenCoordinates
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.
Definition: AbstractProjection.cpp:118
Marble::SphericalProjection::repeatableX
virtual bool repeatableX() const
Definition: SphericalProjection.cpp:120
Marble::SphericalProjection::mapShape
virtual QPainterPath mapShape(const ViewportParams *viewport) const
Definition: SphericalProjection.cpp:315
Marble::AbstractProjection::PreservationType
PreservationType
Definition: AbstractProjection.h:62
Marble::AbstractProjection::SurfaceType
SurfaceType
Definition: AbstractProjection.h:53
QPainterPath
Marble::SphericalProjection::surfaceType
virtual SurfaceType surfaceType() const
Definition: SphericalProjection.h:55
QVector
QSizeF
Marble::SphericalProjection::traversableDateLine
virtual bool traversableDateLine() const
Definition: SphericalProjection.h:53
Marble::AbstractProjection
A base class for all projections in Marble.
Definition: AbstractProjection.h:49
Marble::SphericalProjection::mapCoversViewport
bool mapCoversViewport(const ViewportParams *viewport) const
Definition: SphericalProjection.cpp:296
Marble::GeoDataLatLonAltBox
A class that defines a 3D bounding box for geographic data.
Definition: GeoDataLatLonAltBox.h:49
Marble::SphericalProjection::latLonAltBox
GeoDataLatLonAltBox latLonAltBox(const QRect &screenRect, const ViewportParams *viewport) const
Definition: SphericalProjection.cpp:235
Marble::SphericalProjection::preservationType
virtual PreservationType preservationType() const
Definition: SphericalProjection.h:57
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:42 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