------------------------------------------------------------------------------ Incrementally insert a point into search structure. The method returns the insertion location (i.e., point id). You should use the method IsInsertedPoint() to see whether this point has already been inserted (that is, if you desire to prevent duplicate points). Before using this method you must make sure that newPts hav
| 1195 | // supplied, the bounds has been set properly, and that divs are |
| 1196 | // properly set. (See InitPointInsertion().) |
| 1197 | vtkIdType vtkPointLocator::InsertNextPoint(const double x[3]) |
| 1198 | { |
| 1199 | vtkIdType idx; |
| 1200 | vtkIdList* bucket; |
| 1201 | |
| 1202 | idx = this->GetBucketIndex(x); |
| 1203 | |
| 1204 | if (!(bucket = this->HashTable[idx])) |
| 1205 | { |
| 1206 | bucket = vtkIdList::New(); |
| 1207 | bucket->Allocate(this->NumberOfPointsPerBucket / 2, this->NumberOfPointsPerBucket / 3); |
| 1208 | this->HashTable[idx] = bucket; |
| 1209 | } |
| 1210 | |
| 1211 | bucket->InsertNextId(this->InsertionPointId); |
| 1212 | this->Points->InsertPoint(this->InsertionPointId, x); |
| 1213 | return this->InsertionPointId++; |
| 1214 | } |
| 1215 | |
| 1216 | //------------------------------------------------------------------------------ |
| 1217 | // Incrementally insert a point into search structure with a particular |
no test coverage detected