#include "VisibleCube.h" // ͨ¹ý ProcList ¼Ì³Ð void VisibleCubePlugin::recoveryFrom(const QJsonObject& obj) { DOUBLE_PEAK(_self_d3._length_m); DOUBLE_PEAK(_self_d3._width_m); DOUBLE_PEAK(_self_d3._height_m); DOUBLE_PEAK(_self_lla._lon_deg); DOUBLE_PEAK(_self_lla._lat_deg); DOUBLE_PEAK(_self_lla._alt_m); DOUBLE_PEAK(_self_posture._azimuth_deg); DOUBLE_PEAK(_self_posture._pitch_deg); DOUBLE_PEAK(_self_posture._roll_deg); } void VisibleCubePlugin::saveTo(QJsonObject& obj) const { DOUBLE_SAVE(_self_d3._length_m); DOUBLE_SAVE(_self_d3._width_m); DOUBLE_SAVE(_self_d3._height_m); DOUBLE_SAVE(_self_lla._lon_deg); DOUBLE_SAVE(_self_lla._lat_deg); DOUBLE_SAVE(_self_lla._alt_m); DOUBLE_SAVE(_self_posture._azimuth_deg); DOUBLE_SAVE(_self_posture._pitch_deg); DOUBLE_SAVE(_self_posture._roll_deg); } std::shared_ptr VisibleCubePlugin::newDefault() const { auto copy = std::make_shared(); copy->_bind_entity = _bind_entity; copy->_self_d3 = _self_d3; copy->_self_lla = _self_lla; copy->_self_posture = _self_posture; return copy; } void VisibleCubePlugin::bindEntity(std::weak_ptr ins) { this->_bind_entity = ins; } QString VisibleCubePlugin::name() const { return NAME(VisibleCubePlugin); } void VisibleCubePlugin::execute(std::shared_ptr in, QList>& out) { auto ins = std::make_shared(); ins->_lla_pos = _self_lla; ins->_posture_d3 = _self_posture; ins->_d3_data = _self_d3; ins->reset(in->targetEntity(), in->sourceEntity()); out << ins; } void VisibleCubePlugin::execute(std::shared_ptr in, QList>& out) { auto resp = std::make_shared(); resp->reset(in->targetEntity(), in->sourceEntity()); resp->_success_mark = true; this->_self_d3 = in->_d3_data; out << resp; } void VisibleCubePlugin::execute(std::shared_ptr in, QList>& out) { auto resp = std::make_shared(); resp->reset(in->targetEntity(), in->sourceEntity()); resp->_success_mark = true; this->_self_lla = in->_lla_pos; out << resp; } void VisibleCubePlugin::execute(std::shared_ptr in, QList>& out) { auto resp = std::make_shared(); resp->reset(in->targetEntity(), in->sourceEntity()); resp->_success_mark = true; this->_self_posture = in->_posture_d3; out << resp; }