------------------------------------------------------------------------------
| 358 | |
| 359 | //------------------------------------------------------------------------------ |
| 360 | void 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 | //------------------------------------------------------------------------------ |
| 402 | void vtkAdaptiveDataSetSurfaceFilter::ProcessLeaf1D( |
no test coverage detected