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

Method FindCell

Common/DataModel/vtkCellLocatorStrategy.cxx:113–130  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

111
112//------------------------------------------------------------------------------
113vtkIdType vtkCellLocatorStrategy::FindCell(double x[3], vtkCell* cell, vtkGenericCell* gencell,
114 vtkIdType cellId, double tol2, int& subId, double pcoords[3], double* weights)
115{
116 // If we are given a starting cell, try that.
117 if (cell && (cellId >= 0))
118 {
119 double closestPoint[3];
120 double dist2;
121 if ((cell->EvaluatePosition(x, closestPoint, subId, pcoords, dist2, weights) == 1) &&
122 (dist2 <= tol2))
123 {
124 return cellId;
125 }
126 }
127
128 // Okay cache miss, try the cell locator
129 return this->CellLocator->FindCell(x, tol2, gencell, subId, pcoords, weights);
130}
131
132//------------------------------------------------------------------------------
133vtkIdType vtkCellLocatorStrategy::FindClosestPointWithinRadius(double x[3], double radius,

Callers

nothing calls this directly

Calls 1

EvaluatePositionMethod · 0.45

Tested by

no test coverage detected