Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* Handler for one indirect fire single object
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "aes_db.h"
|
||||
#include "object_base.h"
|
||||
|
||||
#include <CentralEffectSimulation/ces_ftc.h>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
|
||||
#include <QObject>
|
||||
|
||||
|
||||
using Trajectory = QPair<QPolygonF, QVector<double>>;
|
||||
using DetonationLocationRequest = CentralEffectSimulation::DetonationLocationRequest;
|
||||
using DetonationLocationReply = CentralEffectSimulation::DetonationLocationReply;
|
||||
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
class ObjectExplosionSingleCentral final
|
||||
: protected CentralEffectSimulation::Interface::Ftc::DetonationLocationReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ObjectExplosionSingleCentral(MainHandler *mainHandler, QObject *parent = nullptr);
|
||||
~ObjectExplosionSingleCentral();
|
||||
|
||||
Core::FunctionReplyObject updateObject(const Database::AesExplosionSingleCentral &data) override;
|
||||
|
||||
std::vector<Core::GeoPosition> form() const override { return m_aivTrajectory.form(); }
|
||||
QPolygonF generateForm() override;
|
||||
AesType aesType() const override { return AesType::AtExplosionSingleCentral; }
|
||||
bool isCentral() const override { return m_data.isCentral; }
|
||||
void removeTopics();
|
||||
|
||||
protected slots:
|
||||
void onPublishData() override;
|
||||
void onDetonationLocationReply(const DetonationLocationReply &reply) override;
|
||||
|
||||
protected:
|
||||
double chargeRadius() const;
|
||||
void adjustTrajectoryToDetonationLocation(const Core::GeoPosition &detonationLocation);
|
||||
void publishTrajectoryAiv();
|
||||
void publishDetonationAiv();
|
||||
|
||||
private:
|
||||
QPointF positionOf(int participantId);
|
||||
DetonationLocationRequest detonationLocationRequest(const Trajectory &trajectory) const;
|
||||
|
||||
private:
|
||||
AesItemView m_aivDetonation;
|
||||
AesItemView m_aivTrajectory;
|
||||
|
||||
std::vector<Core::GeoPosition> m_trajectory;
|
||||
Core::GeoPosition m_detonationLocation;
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user