fix transforms from handler

This commit is contained in:
AndreaRigoni
2026-03-24 11:36:46 +00:00
parent f13342ff30
commit b45cde0bad
11 changed files with 201 additions and 26 deletions

View File

@@ -5,6 +5,7 @@ set(TESTS
vtkQuadMeshTest
vtkVoxImageTest
vtkVoxImageInteractiveTest
vtkContainerBoxTest2
)
set(LIBRARIES

View File

@@ -0,0 +1,45 @@
/*//////////////////////////////////////////////////////////////////////////////
// CMT Cosmic Muon Tomography project //////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2014, Universita' degli Studi di Padova, INFN sez. di Padova
// All rights reserved
//////////////////////////////////////////////////////////////////////////////*/
#include "Vtk/uLibVtkViewer.h"
#include "Math/ContainerBox.h"
#include "Math/Units.h"
#include "Vtk/vtkContainerBox.h"
#include <iostream>
using namespace uLib;
int main() {
std::cout << "Creating ContainerBox..." << std::endl;
ContainerBox box(Vector3f(1.0, 1.0, 1.0)); // 1x1x1 unit box
box.SetInstanceName("MyTestBox");
std::cout << "Creating VTK representation..." << std::endl;
Vtk::vtkContainerBox v_box(&box);
v_box.SetRepresentation(Vtk::Puppet::Wireframe);
v_box.SetColor(1.0, 0.0, 0.0); // Red
// // 1. Initial Visualization setup (handled by Viewer)
// // 3. Apply scaling of half the size along x
// std::cout << "Applying scaling of 0.5 along X..." << std::endl;
// box.Scale(Vector3f(0.5f, 1.0f, 1.0f));
// box.Updated();
// // 2. Apply rotation along Y axes of 45 deg
// std::cout << "Applying 45 deg rotation along Y..." << std::endl;
// // box.Rotate(45.0_deg, Vector3f::UnitY());
// box.EulerYZYRotate(Vector3f(45.0_deg, 0, 0));
// box.Updated();
std::cout << "Starting viewer (close window to exit)..." << std::endl;
Vtk::Viewer viewer;
viewer.AddPuppet(v_box);
viewer.Start();
return 0;
}