------------------------------------------------------------------------------ Determine whether point given by x[3] has been inserted into points list. Return id of previously inserted point if this is true, otherwise return -1.
| 87 | // Return id of previously inserted point if this is true, otherwise return |
| 88 | // -1. |
| 89 | vtkIdType vtkMergePoints::IsInsertedPoint(const double x[3]) |
| 90 | { |
| 91 | // |
| 92 | // Locate bucket that point is in. |
| 93 | // |
| 94 | vtkIdType idx = this->GetBucketIndex(x); |
| 95 | vtkIdList* bucket = this->HashTable[idx]; |
| 96 | |
| 97 | // see whether we've got duplicate point |
| 98 | vtkIdType ptId = -1; |
| 99 | if (bucket) |
| 100 | { |
| 101 | // |
| 102 | // Check the list of points in that bucket. |
| 103 | // |
| 104 | ptId = vtkMergePointsFindPointInBucket(bucket, this->Points, x); |
| 105 | } |
| 106 | |
| 107 | return ptId; |
| 108 | } |
| 109 | |
| 110 | //------------------------------------------------------------------------------ |
| 111 | int vtkMergePoints::InsertUniquePoint(const double x[3], vtkIdType& id) |