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

Function SanitizeHTGMask

Filters/Extraction/vtkExtractSelection.cxx:47–69  ·  view source on GitHub ↗

Recursive check for visible cells and propagate up visibility to parents

Source from the content-addressed store, hash-verified

45
46// Recursive check for visible cells and propagate up visibility to parents
47bool SanitizeHTGMask(vtkHyperTreeGridNonOrientedCursor* cursor)
48{
49 if (!cursor->IsLeaf())
50 {
51 bool isMasked = cursor->IsMasked();
52 if (isMasked)
53 {
54 cursor->SetMask(false);
55 }
56 bool checkLowerLevelVisible = false;
57 for (vtkIdType iChild = 0; iChild < cursor->GetNumberOfChildren(); ++iChild)
58 {
59 cursor->ToChild(iChild);
60 checkLowerLevelVisible = SanitizeHTGMask(cursor) || checkLowerLevelVisible;
61 cursor->ToParent();
62 }
63 if (!checkLowerLevelVisible && isMasked)
64 {
65 cursor->SetMask(true);
66 }
67 }
68 return !cursor->IsMasked();
69}
70
71}
72

Callers 1

ExtractElementsMethod · 0.85

Calls 6

IsLeafMethod · 0.45
IsMaskedMethod · 0.45
SetMaskMethod · 0.45
GetNumberOfChildrenMethod · 0.45
ToChildMethod · 0.45
ToParentMethod · 0.45

Tested by

no test coverage detected