You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
2.9 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#ifndef _PickedDataProvider_H
#define _PickedDataProvider_H
#include <QObject>
#include "GUIWidgetAPI.h"
class vtkUnstructuredGrid;
class vtkDataSet;
class vtkActor;
class vtkActor2D;
class vtkPlanes;
class vtkExtractSelection;
class vtkSelectionNode;
class vtkIdTypeArray;
namespace GraphData
{
class PickedData;
class GUIWidgetAPI PickedDataProvider:public QObject
{
Q_OBJECT;
public:
static PickedDataProvider* getInstance();
/**
* @brief 清空
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-22
*/
void clearAll();
/**
* @brief 清空拾取数据。
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-04-18
*/
void clearPickedData();
/**
* @brief 清空预选数据。
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-04-30
*/
void clearPickedDataPreview();
/**
* @brief 保存预选数据。
* @param actor拾取演员
* @param index拾取索引
* @param pickedWorldPos拾取的世界坐标
* @return 是否需要刷新
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-04-18
*/
bool setPreviewPicked(vtkActor* actor, int index, double* pickedWorldPos);
/**
* @brief 添加单次点击拾取数据。
* @param actor拾取演员
* @param index拾取索引
* @param pickedWorldPos拾取的世界坐标
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-04-18
*/
void addPicked(vtkActor* actor, int index, double* pickedWorldPos);
/**
* @brief 获取预选高亮数据
* @return PickedData* 预选高亮数据
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-23
*/
PickedData* getPickedPreview();
/**
* @brief 获取拾取数据
* @return PickedData* 拾取数据
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-23
*/
PickedData* getPickDatas();
signals:
;
/**
* @brief 拾取结束信号
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-21
*/
void sigPickDataOver();
private:
PickedDataProvider();
~PickedDataProvider();
private:
static PickedDataProvider* _instance;
/**
* @brief 预选高亮数据
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-21
*/
PickedData* _pickedPreviewData = nullptr;
/**
* @brief 拾取数据
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-22
*/
PickedData* _pickedData = nullptr;
};
}
#endif