#include "VisibleBox.h" // ͨ¹ý ProcList ¼Ì³Ð void VisibleCubePlugin::recoveryFrom(const QJsonObject& obj) { DOUOBLE_PEAK(_self_d3._length_m); DOUOBLE_PEAK(_self_d3._width_m); DOUOBLE_PEAK(_self_d3._height_m); DOUOBLE_PEAK(_self_lla._lon_deg); DOUOBLE_PEAK(_self_lla._lat_deg); DOUOBLE_PEAK(_self_lla._alt_m); DOUOBLE_PEAK(_self_posture._azimuth_deg); DOUOBLE_PEAK(_self_posture._pitch_deg); DOUOBLE_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::defaultNew() 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 map, 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; }