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

Method GetNextVisibleQuadFromHash

Filters/Geometry/vtkDataSetSurfaceFilter.cxx:2684–2714  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2682
2683//------------------------------------------------------------------------------
2684vtkFastGeomQuad* vtkDataSetSurfaceFilter::GetNextVisibleQuadFromHash()
2685{
2686 vtkFastGeomQuad* quad;
2687
2688 quad = this->QuadHashTraversal;
2689
2690 // Move till traversal until we have a quad to return.
2691 // Note: the current traversal has not been returned yet.
2692 while (quad == nullptr || quad->SourceId == -1)
2693 {
2694 if (quad)
2695 { // The quad must be hidden. Move to the next.
2696 quad = quad->Next;
2697 }
2698 else
2699 { // must be the end of the linked list. Move to the next bin.
2700 this->QuadHashTraversalIndex += 1;
2701 if (this->QuadHashTraversalIndex >= this->QuadHashLength)
2702 { // There are no more bins.
2703 this->QuadHashTraversal = nullptr;
2704 return nullptr;
2705 }
2706 quad = this->QuadHash[this->QuadHashTraversalIndex];
2707 }
2708 }
2709
2710 // Now we have a quad to return. Set the traversal to the next entry.
2711 this->QuadHashTraversal = quad->Next;
2712
2713 return quad;
2714}
2715
2716//------------------------------------------------------------------------------
2717vtkIdType vtkDataSetSurfaceFilter::GetOutputPointId(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected