Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+119
@@ -0,0 +1,119 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Interface-Implementation of AirSupport
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// Own
|
||||
#include "abstract_multi_point_map_object_impl.h"
|
||||
#include "basic_path_object_impl.h"
|
||||
#include <MapObjects/air_support.h> // Interface
|
||||
|
||||
|
||||
// Qt
|
||||
#include <QString>
|
||||
|
||||
/*
|
||||
o AFP (Anflugpunkt)
|
||||
\
|
||||
\
|
||||
o ALP (Ausloesepunkt)
|
||||
|
|
||||
|
|
||||
|
|
||||
-------
|
||||
| | AesItem / Buffer (Waffeneinsatzflaeche)
|
||||
-------
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
namespace SituationMap
|
||||
{
|
||||
|
||||
// forward:
|
||||
class ParticipantImpl;
|
||||
|
||||
|
||||
/**
|
||||
* @brief The AirSupportImpl class displays (guez) air support, aka AerialOrdenance
|
||||
*
|
||||
* A class instance consists of the following logical elements:
|
||||
* - mainGraphicalObject (GraphicalObjectPath displaying the main techn. Appearance)
|
||||
* Line from 'Anflugpunkt' (AFP) over 'Ausloesepunkt' (ALP)
|
||||
* to target (center of EffectSimulation)
|
||||
* - mainGraphicalObjectText (displaying the text/name)
|
||||
* - tacticalAppearance (displaying the tact. Appearance)
|
||||
*
|
||||
*/
|
||||
// inherent 'public', to get that implementation
|
||||
// inherent 'public virtual' to get that interface
|
||||
class SITUATIONMAPOBJECTS_EXPORT AirSupportImpl : public BasicPathObjectImpl, public virtual AirSupport
|
||||
{
|
||||
using BaseClass = BasicPathObjectImpl;
|
||||
|
||||
template <typename> friend class GenericObjectFactory;
|
||||
protected:
|
||||
explicit AirSupportImpl(const QString &debugInfo = QString());
|
||||
virtual ~AirSupportImpl();
|
||||
|
||||
void setUniqueId(const UniqueMapId &uniqueId) override;
|
||||
|
||||
public:
|
||||
AirSupportImpl(const AirSupportImpl &other) = delete;
|
||||
AirSupportImpl &operator=(AirSupportImpl &other) = delete;
|
||||
|
||||
void setReferencedObject(const UniqueMapId &referencedObject) override;
|
||||
|
||||
protected:
|
||||
bool updateViewImpl() override;
|
||||
|
||||
bool onMapExtentChanged() override;
|
||||
|
||||
bool updateViewImplBuffer();
|
||||
void updateViewImplLineAfpAlp(bool show, const Point3D &start, const Point3D &end);
|
||||
void updateViewImplLineAlpAes(bool show, const Point3D &start, const Point3D &end);
|
||||
|
||||
bool bufferContainsAlp();
|
||||
Point3D intersectionBufferAndLineAlpAes();
|
||||
Point3D intersectionAesAndLineAlpAes();
|
||||
Point3D intersection(const Esri::ArcGISRuntime::Geometry &geo1, const Esri::ArcGISRuntime::Geometry &geo2);
|
||||
Esri::ArcGISRuntime::Geometry geometryOfLine(const Point3D &start, const Point3D &end);
|
||||
|
||||
friend class MapImpl;
|
||||
bool init(MapImpl *mapImpl, const QString &logicalLayerName) override;
|
||||
|
||||
// internal/admin
|
||||
static const int COORD_INDEX_AFP = 0; // Anflugpunkt
|
||||
static const int COORD_INDEX_ALP = 1; // Ausloesepunkt
|
||||
static const int COORD_INDEX_AES = 2; // target / EffectSimulation
|
||||
|
||||
static const int LINE_INDEX_AFP_ALP = 0; // Anflugpunkt
|
||||
static const int LINE_INDEX_ALP_AES = 1; // Ausloesepunkt
|
||||
|
||||
Point3D getCoordinateTranslated(int idx) const;
|
||||
|
||||
// logical
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// logical
|
||||
class Private;
|
||||
/**
|
||||
* The private d->pointer to not break BC when changing internals of this class
|
||||
*/
|
||||
Private *d = nullptr;
|
||||
|
||||
|
||||
|
||||
LOGGER_T m_logger; ///< Interface of the Logging-Facility
|
||||
};
|
||||
|
||||
|
||||
|
||||
} // namespace SituationMap
|
||||
|
||||
Reference in new issue
Block a user