refactor: migrate vtk classes to use ObjectWrapper for model management and update registration logic
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#ifndef U_VTKCONTAINERBOX_H
|
||||
#define U_VTKCONTAINERBOX_H
|
||||
|
||||
#include "Core/ObjectFactory.h"
|
||||
#include "Math/ContainerBox.h"
|
||||
#include "uLibVtkInterface.h"
|
||||
#include "vtkPolydata.h"
|
||||
@@ -37,11 +38,13 @@ namespace Vtk {
|
||||
|
||||
struct ContainerBoxData;
|
||||
|
||||
class ContainerBox : public Prop3D, public Polydata {
|
||||
|
||||
class ContainerBox : public Prop3D,
|
||||
public Polydata,
|
||||
public uLib::ObjectWrapper<uLib::ContainerBox> {
|
||||
|
||||
uLibTypeMacro(ContainerBox, Prop3D, Polydata)
|
||||
typedef uLib::ContainerBox Content;
|
||||
|
||||
|
||||
public:
|
||||
ContainerBox(Content *content);
|
||||
~ContainerBox();
|
||||
@@ -58,14 +61,15 @@ public:
|
||||
*/
|
||||
virtual void SyncFromVtk() override;
|
||||
|
||||
virtual uLib::Object* GetContent() const override { return (uLib::Object*)m_Content; }
|
||||
virtual uLib::Object *GetContent() const override {
|
||||
return (uLib::Object *)m_model.get();
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void InstallPipe();
|
||||
|
||||
struct ContainerBoxData *d;
|
||||
uLib::ContainerBox *m_Content;
|
||||
|
||||
|
||||
ULIB_DECLARE_PROPERTIES(ContainerBox)
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user