SimsWorld/ComponentBasic/SurfaceMotionPlugin.h

38 lines
1.4 KiB
C
Raw Normal View History

2025-06-14 16:05:57 +00:00
#pragma once
2025-06-21 07:56:59 +00:00
#include <motion_access.h>
#include "componentbasic.h"
2025-06-14 16:05:57 +00:00
/// <summary>
/// ˮ<><CBAE>ƽ̨<C6BD><CCA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
class SurfaceMotionControlPlugin : public ProcList<
2025-06-21 07:56:59 +00:00
WsRespond<HorizontalArcMotion, RespondDefault>,
WsRespond<StrightLineMotion, RespondDefault>,
WsRespond<MotionDeduceRequest, RespondDefault>,
WsRespond<SyncRequest, RespondDefault>
2025-06-14 16:05:57 +00:00
>{
2025-06-21 07:56:59 +00:00
private:
std::weak_ptr<WsEntity> _bind_entity;
std::shared_ptr<const PlatformMotionCommand> _current_cmd = nullptr;
LonLatAlt _start_lla;
Posture _start_posture;
public:
SurfaceMotionControlPlugin();
// ͨ<><CDA8> ProcList <20>̳<EFBFBD>
void execute(std::shared_ptr<Immediate> map, std::shared_ptr<const HorizontalArcMotion> in, QList<std::shared_ptr<RespondDefault>>& out) override;
void execute(std::shared_ptr<Immediate> map, std::shared_ptr<const StrightLineMotion> in, QList<std::shared_ptr<RespondDefault>>& out) override;
void execute(std::shared_ptr<Immediate> map, std::shared_ptr<const MotionDeduceRequest> in, QList<std::shared_ptr<RespondDefault>>& out) override;
void execute(std::shared_ptr<Immediate> map, std::shared_ptr<const SyncRequest> in, QList<std::shared_ptr<RespondDefault>>& out) override;
std::shared_ptr<WsComponent> defaultNew() const override;
void bindEntity(std::weak_ptr<WsEntity> host) override;
QString name() const override;
void recoveryFrom(const QJsonObject& obj) override;
void saveTo(QJsonObject& obj) const override;
2025-06-14 16:05:57 +00:00
};