File indexing completed on 2024-05-05 03:49:51

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2014 Gábor Péterffy <peterffy95@gmail.org>
0004 //
0005 
0006 #ifndef MARBLE_AZIMUTHALPROJECTION_H
0007 #define MARBLE_AZIMUTHALPROJECTION_H
0008 
0009 /** @file
0010  * This file contains the headers for AzimuthalProjection.
0011  *
0012  */
0013 
0014 #include "AbstractProjection.h"
0015 
0016 namespace Marble
0017 {
0018 
0019 class AzimuthalProjectionPrivate;
0020 
0021 /**
0022  * @short A base class for the Gnomonic and Orthographic (Globe) projections in Marble
0023  */
0024 
0025 class AzimuthalProjection : public AbstractProjection
0026 {
0027     // Not a QObject so far because we don't need to send signals.
0028   public:
0029 
0030     AzimuthalProjection();
0031 
0032     ~AzimuthalProjection() override;
0033 
0034     bool repeatableX() const override { return false; }
0035 
0036     bool traversablePoles()  const override { return true; }
0037     bool traversableDateLine()  const override { return true; }
0038 
0039     SurfaceType surfaceType() const override { return Azimuthal; }
0040 
0041     PreservationType preservationType() const override { return NoPreservation; }
0042 
0043     bool isClippedToSphere() const override;
0044 
0045     qreal clippingRadius() const override;
0046 
0047     bool  mapCoversViewport( const ViewportParams *viewport ) const override;
0048 
0049     bool screenCoordinates( const GeoDataLineString &lineString,
0050                             const ViewportParams *viewport,
0051                             QVector<QPolygonF*> &polygons ) const override;
0052 
0053     using AbstractProjection::screenCoordinates;
0054 
0055     QPainterPath mapShape( const ViewportParams *viewport ) const override;
0056 
0057     GeoDataLatLonAltBox latLonAltBox( const QRect& screenRect,
0058                                       const ViewportParams *viewport ) const override;
0059 
0060  protected:
0061     explicit AzimuthalProjection( AzimuthalProjectionPrivate* dd );
0062 
0063  private:
0064     Q_DECLARE_PRIVATE( AzimuthalProjection )
0065     Q_DISABLE_COPY( AzimuthalProjection )
0066 };
0067 
0068 }
0069 
0070 #endif
0071 
0072