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

Method IsTriangle

Common/DataModel/vtkPolyData.cxx:1424–1451  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1422
1423//------------------------------------------------------------------------------
1424int vtkPolyData::IsTriangle(int v1, int v2, int v3)
1425{
1426 vtkIdType n1;
1427 int i, j, tVerts[3];
1428 vtkIdType* cells;
1429 const vtkIdType* tVerts2;
1430 vtkIdType n2;
1431
1432 tVerts[0] = v1;
1433 tVerts[1] = v2;
1434 tVerts[2] = v3;
1435
1436 for (i = 0; i < 3; i++)
1437 {
1438 this->GetPointCells(tVerts[i], n1, cells);
1439 for (j = 0; j < n1; j++)
1440 {
1441 this->GetCellPoints(cells[j], n2, tVerts2);
1442 if ((tVerts[0] == tVerts2[0] || tVerts[0] == tVerts2[1] || tVerts[0] == tVerts2[2]) &&
1443 (tVerts[1] == tVerts2[0] || tVerts[1] == tVerts2[1] || tVerts[1] == tVerts2[2]) &&
1444 (tVerts[2] == tVerts2[0] || tVerts[2] == tVerts2[1] || tVerts[2] == tVerts2[2]))
1445 {
1446 return 1;
1447 }
1448 }
1449 }
1450 return 0;
1451}
1452
1453//------------------------------------------------------------------------------
1454void vtkPolyData::ReportReferences(vtkGarbageCollector* collector)

Callers 1

CollapseEdgeMethod · 0.80

Calls 2

GetPointCellsMethod · 0.95
GetCellPointsMethod · 0.95

Tested by

no test coverage detected