fix transforms from handler
This commit is contained in:
@@ -5,6 +5,7 @@ set(TESTS
|
||||
vtkQuadMeshTest
|
||||
vtkVoxImageTest
|
||||
vtkVoxImageInteractiveTest
|
||||
vtkContainerBoxTest2
|
||||
)
|
||||
|
||||
set(LIBRARIES
|
||||
|
||||
45
src/Vtk/Math/testing/vtkContainerBoxTest2.cpp
Normal file
45
src/Vtk/Math/testing/vtkContainerBoxTest2.cpp
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user