Add points in the bin binIdx. Like GatherPoints(), except at this point maxR2 has been determined. Also will cull entire bins if they are not within the (minR2,MaxR2] query footprint.
| 818 | // maxR2 has been determined. Also will cull entire bins if they are not |
| 819 | // within the (minR2,MaxR2] query footprint. |
| 820 | void AddPoints( |
| 821 | int i, int j, vtkIdType binIdx, int level, double minR2, double maxR2, vtkDist2TupleArray& res) |
| 822 | { |
| 823 | bool gathering = false; |
| 824 | |
| 825 | // If there is nothing in the bin, or the bin is outside of the |
| 826 | // search annulus, skip processing the bin. |
| 827 | vtkIdType numIds = this->Bins->GetNumberOfIds(binIdx); |
| 828 | if (numIds <= 0 || this->CanCullBin(gathering, minR2, maxR2, i, j, level)) |
| 829 | { |
| 830 | return; |
| 831 | } |
| 832 | |
| 833 | // Okay, process the points in the bin. |
| 834 | const vtkLocatorTuple<TIds>* ids = this->Bins->GetIds(binIdx); |
| 835 | double* pt; |
| 836 | for (vtkIdType ii = 0; ii < numIds; ++ii) |
| 837 | { |
| 838 | vtkIdType ptId = ids[ii].PtId; |
| 839 | pt = this->GetPoint(ptId); |
| 840 | double d2 = Distance2BetweenPoints2D(this->X, pt); |
| 841 | if (d2 > minR2 && d2 <= maxR2) |
| 842 | { |
| 843 | res.emplace_back(ptId, d2); |
| 844 | } // if within annulus footprint |
| 845 | } // for all points in this bin |
| 846 | } |
| 847 | }; // AnnulusIterator |
| 848 | |
| 849 | } // anonymous namespace |
no test coverage detected