// Copyright 2010 Simon Edwards <simon@simonzone.com>

//                 Generated by twine2

// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU Library General Public License as
// published by the Free Software Foundation; either version 2, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details

// You should have received a copy of the GNU Library General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

namespace Marble
{
const int tessellationPrecision;
const int latLonAltBoxSamplingRate;
class AbstractProjection /Abstract/
{
%TypeHeaderCode
#include <AbstractProjection.h>
%End

public:
    enum SurfaceType
    {
        Cylindrical,
        Pseudocylindrical,
        Hybrid,
        Conical,
        Pseudoconical,
        Azimuthal
    };
    enum PreservationType
    {
        NoPreservation,
        Conformal,
        EqualArea
    };
                            AbstractProjection ();
    virtual ~AbstractProjection ();
    virtual qreal           maxValidLat () const;
    qreal                   maxLat () const;
    void                    setMaxLat (qreal maxLat);
    virtual qreal           minValidLat () const;
    qreal                   minLat () const;
    void                    setMinLat (qreal minLat);
    virtual bool            repeatableX () const;
    bool                    repeatX () const;
    void                    setRepeatX (bool repeatX);
    virtual bool            traversablePoles () const;
    virtual bool            traversableDateLine () const;
    virtual Marble::AbstractProjection::SurfaceType  surfaceType () const=0;
    virtual Marble::AbstractProjection::PreservationType  preservationType () const;
    virtual bool            isOrientedNormal () const;
    virtual bool            mapCoversViewport (const Marble::ViewportParams* viewport) const=0;
    virtual QPainterPath    mapShape (const Marble::ViewportParams* viewport) const=0;
    QRegion                 mapRegion (const Marble::ViewportParams* viewport) const;
    virtual bool            screenCoordinates (const qreal lon, const qreal lat, const Marble::ViewportParams* viewport, qreal& x, qreal& y) const=0;
    virtual bool            screenCoordinates (const Marble::GeoDataCoordinates& geopoint, const Marble::ViewportParams* viewport, qreal& x, qreal& y, bool& globeHidesPoint) const=0;
//ig    bool                    screenCoordinates (const Marble::GeoDataCoordinates& geopoint, const Marble::ViewportParams* viewport, qreal& x, qreal& y) const;
    bool                    screenCoordinates (const Marble::GeoDataCoordinates& geopoint, const Marble::ViewportParams* viewport, QPointF& screenpoint) const;
//ig    bool                    screenCoordinates (const Marble::GeoDataCoordinates& coordinates, const Marble::ViewportParams* viewport, qreal* x, qreal& y, int& pointRepeatNum, bool& globeHidesPoint) const;
    virtual bool            screenCoordinates (const Marble::GeoDataCoordinates& coordinates, const Marble::ViewportParams* viewport, qreal* x, qreal& y, int& pointRepeatNum, const QSizeF& size, bool& globeHidesPoint) const=0;
//ig    bool                    screenCoordinates (const Marble::GeoDataLineString& lineString, const Marble::ViewportParams* viewport, QVector<QPolygonF*>& polygons) const;
    virtual bool            geoCoordinates (const int x, const int y, const Marble::ViewportParams* viewport, qreal& lon, qreal& lat, Marble::GeoDataCoordinates::Unit unit = Marble::GeoDataCoordinates::Degree) const=0;
    virtual Marble::GeoDataLatLonAltBox  latLonAltBox (const QRect& screenRect, const Marble::ViewportParams* viewport) const;
protected:
//ig                            AbstractProjection (AbstractProjectionPrivate* dd);
};
};
