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

Method IsInsertedPoint

Common/DataModel/vtkMergePoints.cxx:89–108  ·  view source on GitHub ↗

------------------------------------------------------------------------------ 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.

Source from the content-addressed store, hash-verified

87// Return id of previously inserted point if this is true, otherwise return
88// -1.
89vtkIdType 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//------------------------------------------------------------------------------
111int vtkMergePoints::InsertUniquePoint(const double x[3], vtkIdType& id)

Callers 5

vtkGetVectorMacroFunction · 0.45
CopyCellsMethod · 0.45
RequestDataMethod · 0.45
FindEnclosingFacesMethod · 0.45

Calls 2

GetBucketIndexMethod · 0.45

Tested by 1