------------------------------------------------------------------------------
| 599 | |
| 600 | //------------------------------------------------------------------------------ |
| 601 | void vtkJSONSceneExporter::WritePropCollection( |
| 602 | vtkPropCollection* props, std::ostream& sceneComponents) |
| 603 | { |
| 604 | vtkIdType nbProps = props->GetNumberOfItems(); |
| 605 | for (vtkIdType rpIdx = 0; rpIdx < nbProps; rpIdx++) |
| 606 | { |
| 607 | vtkProp* prop = vtkProp::SafeDownCast(props->GetItemAsObject(rpIdx)); |
| 608 | // Skip non-visible actors |
| 609 | if (!prop || !prop->GetVisibility()) |
| 610 | { |
| 611 | continue; |
| 612 | } |
| 613 | |
| 614 | // Skip actors with no geometry |
| 615 | vtkActor* actor = vtkActor::SafeDownCast(prop); |
| 616 | if (actor) |
| 617 | { |
| 618 | vtkMapper* mapper = actor->GetMapper(); |
| 619 | |
| 620 | vtkDataObject* dataObject = mapper->GetInputDataObject(0, 0); |
| 621 | this->WriteDataObject(sceneComponents, dataObject, actor, nullptr, nullptr); |
| 622 | this->WriteLookupTable(mapper->GetArrayName(), mapper->GetLookupTable()); |
| 623 | } |
| 624 | } |
| 625 | } |
| 626 | |
| 627 | //------------------------------------------------------------------------------ |
| 628 | void vtkJSONSceneExporter::WriteVolumeCollection( |
no test coverage detected