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

Method InsertPoint

Common/DataModel/vtkPointLocator.cxx:1223–1239  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Incrementally insert a point into search structure with a particular index value. 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 have been supplied, the bounds ha

Source from the content-addressed store, hash-verified

1221// newPts have been supplied, the bounds has been set properly, and that
1222// divs are properly set. (See InitPointInsertion().)
1223void vtkPointLocator::InsertPoint(vtkIdType ptId, const double x[3])
1224{
1225 vtkIdType idx;
1226 vtkIdList* bucket;
1227
1228 idx = this->GetBucketIndex(x);
1229
1230 if (!(bucket = this->HashTable[idx]))
1231 {
1232 bucket = vtkIdList::New();
1233 bucket->Allocate(this->NumberOfPointsPerBucket, this->NumberOfPointsPerBucket / 3);
1234 this->HashTable[idx] = bucket;
1235 }
1236
1237 bucket->InsertNextId(ptId);
1238 this->Points->InsertPoint(ptId, x);
1239}
1240
1241//------------------------------------------------------------------------------
1242// Determine whether point given by x[3] has been inserted into points list.

Callers 15

InsertUniquePointMethod · 0.45
ContourMethod · 0.45
ClipMethod · 0.45
InitializeMethod · 0.45
IntersectWithLineMethod · 0.45
IntersectWithLineMethod · 0.45
TriangulateLocalIdsMethod · 0.45
TriangulateLocalIdsMethod · 0.45
TessellateMethod · 0.45
InsertNextPointMethod · 0.45
InsertUniquePointMethod · 0.45
ComputeRegionVerticesMethod · 0.45

Calls 4

InsertNextIdMethod · 0.80
NewFunction · 0.50
GetBucketIndexMethod · 0.45
AllocateMethod · 0.45

Tested by 3

TestPolyDataRemoveCellFunction · 0.36
ComparePointLocatorsFunction · 0.36