fix display of cylinder
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user