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

Method FindCell

Common/DataModel/vtkRectilinearGrid.cxx:286–312  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

284
285//------------------------------------------------------------------------------
286vtkIdType vtkRectilinearGrid::FindCell(double x[3], vtkCell* vtkNotUsed(cell),
287 vtkIdType vtkNotUsed(cellId), double vtkNotUsed(tol2), int& subId, double pcoords[3],
288 double* weights)
289{
290 int loc[3];
291
292 if (this->ComputeStructuredCoordinates(x, loc, pcoords) == 0)
293 {
294 return -1;
295 }
296
297 if (weights)
298 {
299 vtkVoxel::InterpolationFunctions(pcoords, weights);
300 }
301
302 //
303 // From this location get the cell id
304 //
305 subId = 0;
306 const vtkIdType cellId = this->ComputeCellId(loc);
307 if (!this->IsCellVisible(cellId))
308 {
309 return -1;
310 }
311 return cellId;
312}
313
314//------------------------------------------------------------------------------
315void vtkRectilinearGrid::ComputeBounds()

Callers

nothing calls this directly

Calls 3

ComputeCellIdMethod · 0.95
IsCellVisibleMethod · 0.45

Tested by

no test coverage detected