| 594 | std::vector<unsigned int> CompositeIndices; |
| 595 | |
| 596 | void Visit(int nodeid) override |
| 597 | { |
| 598 | auto assembly = this->GetAssembly(); |
| 599 | assert(assembly->HasAttribute(nodeid, "cid")); |
| 600 | const auto cid = assembly->GetAttributeOrDefault(nodeid, "cid", 0u); |
| 601 | const auto type = assembly->GetAttributeOrDefault(nodeid, "vtk_type", 0); |
| 602 | if (!this->EnabledStack.empty() || |
| 603 | this->SelectedNodes.find(nodeid) != this->SelectedNodes.end()) |
| 604 | { |
| 605 | if (vtkDataObjectTypes::TypeIdIsA(type, VTK_COMPOSITE_DATA_SET)) |
| 606 | { |
| 607 | if (vtkDataObjectTypes::TypeIdIsA(type, VTK_MULTIPIECE_DATA_SET)) |
| 608 | { |
| 609 | // add indices for all parts. |
| 610 | for (unsigned int cc = 0, |
| 611 | max = assembly->GetAttributeOrDefault(nodeid, "vtk_num_pieces", 0u); |
| 612 | cc < max; ++cc) |
| 613 | { |
| 614 | this->CompositeIndices.push_back(cid + 1 + cc); |
| 615 | } |
| 616 | } |
| 617 | else |
| 618 | { |
| 619 | // push to enable stack so that all our children are treated as |
| 620 | // selected. |
| 621 | this->EnabledStack.push_back(nodeid); |
| 622 | } |
| 623 | } |
| 624 | else |
| 625 | { |
| 626 | this->CompositeIndices.push_back(cid); |
| 627 | } |
| 628 | } |
| 629 | } |
| 630 | |
| 631 | void EndSubTree(int nodeid) override |
| 632 | { |
nothing calls this directly
no test coverage detected