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

@@ -23,7 +23,6 @@
//////////////////////////////////////////////////////////////////////////////*/
#include "Vtk/Math/vtkQuadMesh.h"
#include "Vtk/Math/vtkQuadMesh.h"
#include "Vtk/uLibVtkViewer.h"
@@ -39,10 +38,10 @@ BOOST_AUTO_TEST_CASE(vtkQuadMeshConstruction) {
mesh.AddPoint(Vector3f(1, 0, 0));
mesh.AddPoint(Vector3f(1, 1, 0));
mesh.AddPoint(Vector3f(0, 1, 0));
mesh.AddQuad(Vector4i(0, 1, 2, 3));
Vtk::QuadMesh v_mesh(mesh);
Vtk::QuadMesh v_mesh(&mesh);
Object::connect(&mesh, &QuadMesh::Updated, [&mesh]() {
Vector3f points[4];
@@ -50,8 +49,8 @@ BOOST_AUTO_TEST_CASE(vtkQuadMeshConstruction) {
points[1] = mesh.GetPoint(1);
points[2] = mesh.GetPoint(2);
points[3] = mesh.GetPoint(3);
std::cout << "mesh updated: " << points[0] << " " << points[1]
<< " " << points[2] << " " << points[3] << std::endl;
std::cout << "mesh updated: " << points[0] << " " << points[1] << " "
<< points[2] << " " << points[3] << std::endl;
});
v_mesh.Update();