ceshi/plugins/CA_PhysicalField/PropPickerInteractionStyle.h

56 lines
1.7 KiB
C++
Raw Blame History

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 PROPPICKERINTERACTIONSTYLE_H
#define PROPPICKERINTERACTIONSTYLE_H
#include <QSet>
#include <vtkCommand.h>
#include <public/services/VisualWidgetService.h>
class BoundarySetting;
class PropPickerInteractionStyle : public vtkCommand
{
public:
static PropPickerInteractionStyle* New(BoundarySetting *boundarySetting)
{
return new PropPickerInteractionStyle(boundarySetting);
}
PropPickerInteractionStyle(BoundarySetting *boundarySetting);
virtual void Execute(vtkObject* caller, unsigned long eventId, void* callData) override;
//0-无选择,1-选网格点2-选网格面
void setSelectModel(int selectModel);
//返回选中的点
QSet<int> getSelectedPoint();
//清理选中的点,赋 赋值的颜色
void clearSelectedPoint();
//设置点的颜色
void setPointColor(QSet<int> point, double color[]);
void addSelectedPoint(int pointId);
void clearPointColor();
void setPointColor(int pointId, double color[]);
void pointRefresh();
QSet<int> getSelectedFace();
void setFaceColor(QSet<int> face, double color[]);
void clearSelectedFace();
void clearFaceColor();
void faceRefresh();
void setFaceColor(int faceId, double color[]);
void addSelectedFace(int faceId);
void set3DType(bool is3DType);
private:
void selectGridNode(vtkObject *caller, unsigned long eventId, void *callData);
void selectGridFace(vtkObject *caller, unsigned long eventId, void *callData);
BoundarySetting *m_boundarySetting;
int m_selectModel;
QSet<int>m_selectedPoint;
QSet<int>m_selectedFace;
VisualWidgetService *m_visualWidgetService;
bool m_is3DType;
};
#endif // PROPPICKERINTERACTIONSTYLE_H