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

Method SamplePolygon

Filters/Modeling/vtkPolyDataPointSampler.cxx:513–528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

511 }
512
513 void SamplePolygon(vtkIdType npts, const vtkIdType* pts) override
514 {
515 vtkIdType triPts[3];
516 for (vtkIdType i = 0; i < (npts - 2); ++i)
517 {
518 triPts[0] = pts[0];
519 triPts[1] = pts[i + 1];
520 triPts[2] = pts[i + 2];
521 if (Self->GetGenerateEdgePoints() && this->EdgeTable->IsEdge(triPts[0], triPts[2]) == -1)
522 {
523 this->EdgeTable->InsertEdge(triPts[0], triPts[2]);
524 this->SampleEdge(triPts[0], triPts[2]);
525 }
526 this->SampleTriangle(triPts);
527 }
528 }
529};
530
531} // anonymous namespace

Callers 1

operator()Method · 0.45

Calls 4

SampleEdgeMethod · 0.95
SampleTriangleMethod · 0.95
IsEdgeMethod · 0.45
InsertEdgeMethod · 0.45

Tested by

no test coverage detected