fix display of cylinder

This commit is contained in:
AndreaRigoni
2026-03-27 15:23:59 +00:00
parent e40cc77a5f
commit fa7c0f670e
3 changed files with 33 additions and 21 deletions

View File

@@ -121,6 +121,7 @@ public:
TRS m_Transform;
void ApplyAppearance(vtkProp *p) {
if (!p) return;
p->SetVisibility(m_Visibility);
p->SetPickable(m_Selectable);
p->SetDragable(m_Dragable);
@@ -143,6 +144,13 @@ public:
if (m_Opacity != -1.0) {
actor->GetProperty()->SetOpacity(m_Opacity);
}
} else if (vtkAssembly *asm_p = vtkAssembly::SafeDownCast(p)) {
// Recursively apply to parts of the assembly
vtkProp3DCollection *parts = asm_p->GetParts();
parts->InitTraversal();
for (int i = 0; i < parts->GetNumberOfItems(); ++i) {
this->ApplyAppearance(parts->GetNextProp3D());
}
}
}