refactor: migrate vtk classes to use ObjectWrapper for model management and update registration logic
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user