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

Method GetParametricDistance

Common/DataModel/vtkCell.cxx:520–542  ·  view source on GitHub ↗

------------------------------------------------------------------------------ This method works fine for all "rectangular" cells, not triangular and tetrahedral topologies.

Source from the content-addressed store, hash-verified

518// This method works fine for all "rectangular" cells, not triangular
519// and tetrahedral topologies.
520double vtkCell::GetParametricDistance(const double pcoords[3])
521{
522 int i;
523 double pDist, pDistMax = 0.0;
524
525 for (i = 0; i < 3; i++)
526 {
527 if (pcoords[i] < 0.0)
528 {
529 pDist = -pcoords[i];
530 }
531 else if (pcoords[i] > 1.0)
532 {
533 pDist = pcoords[i] - 1.0;
534 }
535 else // inside the cell in the parametric direction
536 {
537 pDist = 0.0;
538 }
539 pDistMax = std::max(pDist, pDistMax);
540 }
541 return pDistMax;
542}
543
544//------------------------------------------------------------------------------
545void vtkCell::PrintSelf(ostream& os, vtkIndent indent)

Callers 4

TestDataSetsFunction · 0.45
TestOneCellFunction · 0.45
TestCellFunction · 0.45

Calls 1

maxFunction · 0.50

Tested by 3

TestDataSetsFunction · 0.36
TestOneCellFunction · 0.36
TestCellFunction · 0.36