refactor: migrate vtk classes to use ObjectWrapper for model management and update registration logic

This commit is contained in:
AndreaRigoni
2026-04-09 10:38:45 +00:00
parent 64a87e97e3
commit db76513e79
27 changed files with 479 additions and 349 deletions

View File

@@ -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)
};