Initial commit

This commit is contained in:
torsten committed 2026-08-13 18:33:10 +02:00
commit b7d90b9afe
16245 files changed
+3396666

No files matched your search

+65
View File
@@ -0,0 +1,65 @@
/**
* @RDE_HEADER@
* Class Viewpoint2D
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
// Own
#include "situation_map_types.h"
#include <Common/situation_map_logging.h>
#include <situation_map_export.h>
// Qt
#include <QString>
class QJsonObject;
//----------------------------------------------------------------------------
namespace SituationMap
{
//----------------------------------------------------------------------------
// for 2D:
class SITUATIONMAP_EXPORT Viewpoint2D
{
public:
static constexpr double defaultScale = 999999.9;
Viewpoint2D(const QPointF &centerGeo = QPointF(), double scale = defaultScale, double rotation = 0);
bool isNull() const;
void resetViewpoint();
QPointF centerGeo() const;
void setCenterGeo(const QPointF &centerGeo);
double scale() const;
void setScale(double scale);
double rotation() const;
void setRotation(double rotation);
static Viewpoint2D read(const QJsonObject &json);
QJsonObject toJsonObject() const;
QString toString() const;
protected:
QPointF m_centerGeo; ///< lon, lat
double m_scale = defaultScale; // '0' may lead to an ESRI exception. Try to avoid and use another value
double m_rotation = 0; ///< absoluteAngleDegrees
};
//----------------------------------------------------------------------------
SITUATIONMAP_EXPORT std::ostream &operator<< (std::ostream &stream,
const SituationMap::Viewpoint2D &value);
} // namespace SituationMap