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.
AppFlow/FITK_Component/FITKRenderWindowVTK/FITKGraphObjectVTK.h

209 lines
6.0 KiB
C

/**
*
* @file FITKGraphObject.h
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-12
*
*/
#ifndef _FITKGraphObject_H_VTK_
#define _FITKGraphObject_H_VTK_
#include "FITKRenderWindowVTKAPI.h"
#include "FITK_Kernel/FITKCore/FITKAbstractGraphObject.h"
#include "FITK_Kernel/FITKCore/FITKCoreMacros.h"
#include <QObject>
class vtkProp;
class vtkInteractorObserver;
class vtkDataSetMapper;
class vtkAlgorithmOutput;
namespace Core
{
class FITKAbstractDataObject;
}
#ifndef FITKGraphRegist
#define FITKGraphRegist( \
thisClass, superclass) \
protected: \
const char* GetClassName() const { return #thisClass; } \
public: \
typedef superclass Superclass; \
static thisClass* SafeDownCast(Comp::FITKGraphObjectVTK* o) \
{ \
return dynamic_cast<thisClass*>(o); \
}
#endif // !FITKGraphRegist
namespace Comp
{
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-12
*/
class FITKRenderWindowVTKAPI FITKGraphObjectVTK :
public Core::FITKAbstractGraphObject
{
FITKCLASS(Comp, FITKGraphObjectVTK);
Q_OBJECT
public:
/**
* @brief Construct a new FITKGraphObject object
* @param[i] dataObject
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-25
*/
explicit FITKGraphObjectVTK(Core::FITKAbstractDataObject* dataObject);
explicit FITKGraphObjectVTK();
/**
* @brief Destroy the FITKActor object
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-12
*/
virtual ~FITKGraphObjectVTK();
/**
* @brief VTK
* @param[i] actor vtkProp
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-14
*/
void addActor(vtkProp* actor);
/**
* @brief VTK
* @param[i] index
* @return vtkProp*
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-14
*/
vtkProp* getActor(int index);
/**
* @brief VTK
* @return int
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-14
*/
int getActorCount();
/**
* @brief
* @param widget
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-05
*/
void addWidget(vtkInteractorObserver* widget);
/**
* @brief
* @param index
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-05
*/
vtkInteractorObserver* getWidget(int index);
/**
* @brief
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-05
*/
int getWidgetCount();
/**
* @brief
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-05-17
*/
bool hasFixedBounds();
/**
* @brief []
* @param
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-05-17
*/
virtual bool getFixedBounds(double* bounds);
/**
* @brief
* @param prop
* @param bounds
* @param ignoreVisibility
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-05-17
*/
bool getActorBounds(vtkProp* prop, double* bounds, bool ignoreVisibility = false);
/**
* @brief
* @param props
* @param bounds
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-05-17
*/
bool getActorsBounds(QList<vtkProp*> props, double* bounds);
/**
* @brief
* @return Core::FITKAbstractDataObject*
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-22
*/
// Core::FITKAbstractDataObject* getDataObject();
// signals:
// /**
// * @brief 移除渲染对象
// * @param[i] object 渲染对象
// * @author BaGuijun (baguijun@163.com)
// * @date 2024-03-14
// */
// void removeObjectSig(FITKGraphObject* object);
// /**
// * @brief 刷新渲染对象
// * @param[i] object 渲染对象
// * @author BaGuijun (baguijun@163.com)
// * @date 2024-03-14
// */
// void reRenderObjectSig(FITKGraphObject* object);
// /**
// * @brief 强制刷新
// * @author BaGuijun (baguijun@163.com)
// * @date 2024-03-14
// */
// void reRenderSig();
protected:
/**
* @brief VTK
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-12
*/
QList<vtkProp*> m_actorList;
/**
* @brief VTK
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-07-05
*/
QList<vtkInteractorObserver*> m_widgetList;
/**
* @brief
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-05-17
*/
bool m_hasFixedBounds = true;
};
}
#endif