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

Method GetEdge

Common/DataModel/vtkTriangle.cxx:529–542  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Get the edge specified by edgeId (range 0 to 2) and return that edge's coordinates.

Source from the content-addressed store, hash-verified

527// Get the edge specified by edgeId (range 0 to 2) and return that edge's
528// coordinates.
529vtkCell* vtkTriangle::GetEdge(int edgeId)
530{
531 int edgeIdPlus1 = (edgeId > 1 ? 0 : (edgeId + 1));
532
533 // load point id's
534 this->Line->PointIds->SetId(0, this->PointIds->GetId(edgeId));
535 this->Line->PointIds->SetId(1, this->PointIds->GetId(edgeIdPlus1));
536
537 // load coordinates
538 this->Line->Points->SetPoint(0, this->Points->GetPoint(edgeId));
539 this->Line->Points->SetPoint(1, this->Points->GetPoint(edgeIdPlus1));
540
541 return this->Line;
542}
543
544//------------------------------------------------------------------------------
545// Plane intersection plus in/out test on triangle. The in/out test is

Callers 1

IntersectWithLineMethod · 0.95

Calls 4

SetIdMethod · 0.45
GetIdMethod · 0.45
SetPointMethod · 0.45
GetPointMethod · 0.45

Tested by

no test coverage detected