55 lines
1.9 KiB
C
55 lines
1.9 KiB
C
|
|
#ifndef IYSTATORPOSITIONSTATUS_H
|
|||
|
|
#define IYSTATORPOSITIONSTATUS_H
|
|||
|
|
|
|||
|
|
#include <string>
|
|||
|
|
#include <functional>
|
|||
|
|
#include <vector>
|
|||
|
|
#include <QImage>
|
|||
|
|
#include <QMetaType>
|
|||
|
|
|
|||
|
|
// 使用 AppCommon 提供的通用接口和类型
|
|||
|
|
#include "IVisionApplicationStatus.h"
|
|||
|
|
|
|||
|
|
// 定子抓取位置结构体
|
|||
|
|
struct StatorGraspPosition : public PositionData<double> {
|
|||
|
|
int objID = 0; // 物体ID(来自 SWD_statorInnerGrasper.objID)
|
|||
|
|
|
|||
|
|
// 默认构造函数
|
|||
|
|
StatorGraspPosition() : PositionData<double>(), objID(0) {}
|
|||
|
|
|
|||
|
|
// 带参构造函数
|
|||
|
|
StatorGraspPosition(int _objID, double _x, double _y, double _z, double _roll, double _pitch, double _yaw)
|
|||
|
|
: PositionData<double>(_x, _y, _z, _roll, _pitch, _yaw), objID(_objID) {}
|
|||
|
|
|
|||
|
|
// 拷贝构造函数和赋值运算符
|
|||
|
|
StatorGraspPosition(const StatorGraspPosition&) = default;
|
|||
|
|
StatorGraspPosition& operator=(const StatorGraspPosition&) = default;
|
|||
|
|
|
|||
|
|
// 从 PositionData 拷贝构造
|
|||
|
|
StatorGraspPosition(const PositionData<double>& pos)
|
|||
|
|
: PositionData<double>(pos), objID(0) {}
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
// 定子定位检测结果结构体
|
|||
|
|
struct StatorPositionDetectionResult : public DetectionResultData<StatorGraspPosition> {
|
|||
|
|
// 默认构造函数
|
|||
|
|
StatorPositionDetectionResult() = default;
|
|||
|
|
|
|||
|
|
// 拷贝构造函数和赋值运算符
|
|||
|
|
StatorPositionDetectionResult(const StatorPositionDetectionResult&) = default;
|
|||
|
|
StatorPositionDetectionResult& operator=(const StatorPositionDetectionResult&) = default;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
// 状态回调接口
|
|||
|
|
class IYStatorPositionStatus : public IVisionApplicationStatus<StatorPositionDetectionResult>
|
|||
|
|
{
|
|||
|
|
public:
|
|||
|
|
virtual ~IYStatorPositionStatus() = default;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
// 声明Qt元类型,使这些结构体能够在信号槽中传递
|
|||
|
|
Q_DECLARE_METATYPE(StatorGraspPosition)
|
|||
|
|
Q_DECLARE_METATYPE(StatorPositionDetectionResult)
|
|||
|
|
|
|||
|
|
#endif // IYSTATORPOSITIONSTATUS_H
|