refactor: remove Math library build configuration and add support for BoxSolid in vtkObjectsContext

This commit is contained in:
AndreaRigoni
2026-04-01 20:30:21 +00:00
parent 9118afdd13
commit a1c5fc2600
2 changed files with 5 additions and 42 deletions

View File

@@ -1,42 +0,0 @@
SUBDIRS = .
include $(top_srcdir)/Common.am
library_includedir = $(includedir)/libmutom-${PACKAGE_VERSION}/Math
library_include_HEADERS = ContainerBox.h \
Dense.h \
Geometry.h \
Transform.h \
StructuredData.h\
StructuredGrid.h\
VoxImage.h \
VoxRaytracer.h \
Utils.h \
VoxImageFilter.h\
VoxImageFilter.hpp \
VoxImageFilterLinear.hpp \
VoxImageFilterMedian.hpp \
VoxImageFilterABTrim.hpp \
VoxImageFilterBilateral.hpp \
VoxImageFilterThreshold.hpp \
VoxImageFilter2ndStat.hpp \
VoxImageFilterCustom.hpp \
Accumulator.h \
TriangleMesh.h
_MATH_SOURCES = \
VoxRaytracer.cpp \
StructuredData.cpp \
StructuredGrid.cpp \
VoxImage.cpp \
TriangleMesh.cpp \
Dense.cpp
noinst_LTLIBRARIES = libmutommath.la
libmutommath_la_SOURCES = ${_MATH_SOURCES}

View File

@@ -3,7 +3,9 @@
#include "Vtk/Math/vtkCylinder.h"
#include "Vtk/Math/vtkAssembly.h"
#include "Vtk/Math/vtkVoxImage.h"
#include "HEP/Detectors/vtkDetectorChamber.h"
#include "HEP/Geant/vtkBoxSolid.h"
#include <vtkAssembly.h>
#include <vtkPropCollection.h>
@@ -127,6 +129,9 @@ Puppet* vtkObjectsContext::CreatePuppet(uLib::Object* obj) {
} else if (auto* assembly = dynamic_cast<uLib::Assembly*>(obj)) {
return new Assembly(assembly);
}
else if (auto* box = dynamic_cast<uLib::Geant::BoxSolid*>(obj)) {
return new vtkBoxSolid(box);
}
// Fallback if we don't know the exact class but it might be a context itself
if (auto subCtx = dynamic_cast<uLib::ObjectsContext*>(obj)) {