transform properties
This commit is contained in:
@@ -110,17 +110,16 @@ void vtkObjectsContext::Update() {
|
||||
Puppet* vtkObjectsContext::CreatePuppet(uLib::Object* obj) {
|
||||
if (!obj) return nullptr;
|
||||
|
||||
const char* className = obj->GetClassName();
|
||||
if (std::strcmp(className, "ContainerBox") == 0) {
|
||||
return new vtkContainerBox(static_cast<uLib::ContainerBox*>(obj));
|
||||
} else if (std::strcmp(className, "DetectorChamber") == 0) {
|
||||
return new vtkDetectorChamber(static_cast<uLib::DetectorChamber*>(obj));
|
||||
} else if (std::strcmp(className, "Cylinder") == 0) {
|
||||
return new vtkCylinder(static_cast<uLib::Cylinder*>(obj));
|
||||
} else if (std::strcmp(className, "VoxImage") == 0) {
|
||||
return new vtkVoxImage(*static_cast<uLib::Abstract::VoxImage*>(obj));
|
||||
} else if (std::strcmp(className, "Assembly") == 0) {
|
||||
return new Assembly(static_cast<uLib::Assembly*>(obj));
|
||||
if (auto* box = dynamic_cast<uLib::ContainerBox*>(obj)) {
|
||||
return new vtkContainerBox(box);
|
||||
} else if (auto* chamber = dynamic_cast<uLib::DetectorChamber*>(obj)) {
|
||||
return new vtkDetectorChamber(chamber);
|
||||
} else if (auto* cylinder = dynamic_cast<uLib::Cylinder*>(obj)) {
|
||||
return new vtkCylinder(cylinder);
|
||||
} else if (auto* vox = dynamic_cast<uLib::Abstract::VoxImage*>(obj)) {
|
||||
return new vtkVoxImage(*vox);
|
||||
} else if (auto* assembly = dynamic_cast<uLib::Assembly*>(obj)) {
|
||||
return new Assembly(assembly);
|
||||
}
|
||||
|
||||
// Fallback if we don't know the exact class but it might be a context itself
|
||||
|
||||
Reference in New Issue
Block a user