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

Method RecursivelyProcessTree2D

Filters/Hybrid/vtkAdaptiveDataSetSurfaceFilter.cxx:360–399  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

358
359//------------------------------------------------------------------------------
360void vtkAdaptiveDataSetSurfaceFilter::RecursivelyProcessTree2D(
361 vtkHyperTreeGridNonOrientedGeometryCursor* cursor, int level)
362{
363 double originAxis1 = cursor->GetOrigin()[this->Axis1];
364 double originAxis2 = cursor->GetOrigin()[this->Axis2];
365
366 std::array<std::array<double, 3>, 4> corners = { { { { originAxis1, originAxis2, 0.0 } },
367 { { originAxis1 + cursor->GetSize()[this->Axis1], originAxis2, 0.0 } },
368 { { originAxis1, originAxis2 + cursor->GetSize()[this->Axis2], 0.0 } },
369 { { originAxis1 + cursor->GetSize()[this->Axis1], originAxis2 + cursor->GetSize()[this->Axis2],
370 0.0 } } } };
371
372 // We only process the nodes than are going to be rendered
373 if (level < this->MaxLevel &&
374 this->IsShapeVisible<4>(corners, level) == ShapeState::OUT_OF_SCREEN)
375 {
376 return;
377 }
378
379 if (cursor->IsLeaf() || level >= this->MaxLevel ||
380 (this->FixedLevelMax != -1 && level >= this->FixedLevelMax))
381 {
382 this->ProcessLeaf2D(cursor);
383 }
384 else
385 {
386 // Cursor is not at leaf, recurse to all children
387 const int numChildren = cursor->GetNumberOfChildren();
388 for (int iChild = 0; iChild < numChildren; ++iChild)
389 {
390 if (this->CheckAbort())
391 {
392 break;
393 }
394 cursor->ToChild(iChild);
395 this->RecursivelyProcessTree2D(cursor, level + 1);
396 cursor->ToParent();
397 }
398 }
399}
400
401//------------------------------------------------------------------------------
402void vtkAdaptiveDataSetSurfaceFilter::ProcessLeaf1D(

Callers 1

ProcessTreesMethod · 0.95

Calls 8

ProcessLeaf2DMethod · 0.95
CheckAbortMethod · 0.80
GetOriginMethod · 0.45
GetSizeMethod · 0.45
IsLeafMethod · 0.45
GetNumberOfChildrenMethod · 0.45
ToChildMethod · 0.45
ToParentMethod · 0.45

Tested by

no test coverage detected