MCPcopy Create free account
hub / github.com/Kitware/VTK / Visit

Method Visit

Common/DataModel/vtkDataAssemblyUtilities.cxx:596–629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 8

GetAttributeOrDefaultMethod · 0.80
assertFunction · 0.50
GetAssemblyMethod · 0.45
HasAttributeMethod · 0.45
emptyMethod · 0.45
findMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected