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

Method FindPoint

Testing/GenericBridge/vtkBridgeDataSet.cxx:439–454  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Description: Locate closest point `p' to position `x' (global coordinates) \pre not_empty: GetNumberOfPoints()>0 \pre p_exists: p!=0

Source from the content-addressed store, hash-verified

437// \pre not_empty: GetNumberOfPoints()>0
438// \pre p_exists: p!=0
439void vtkBridgeDataSet::FindPoint(double x[3], vtkGenericPointIterator* p)
440{
441 assert("pre: not_empty" && GetNumberOfPoints() > 0);
442 assert("pre: p_exists" && p != nullptr);
443 vtkBridgePointIterator* bp = static_cast<vtkBridgePointIterator*>(p);
444
445 if (this->Implementation != nullptr)
446 {
447 vtkIdType pt = this->Implementation->FindPoint(x);
448 bp->InitWithOnePoint(this, pt);
449 }
450 else
451 {
452 bp->InitWithOnePoint(this, -1);
453 }
454}
455
456//------------------------------------------------------------------------------
457// Description:

Callers

nothing calls this directly

Calls 3

assertFunction · 0.50
GetNumberOfPointsFunction · 0.50
InitWithOnePointMethod · 0.45

Tested by

no test coverage detected