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

Method GetFace

Filters/Geometry/vtkGeometryFilter.cxx:1595–1629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1593 };
1594
1595 std::array<TInputIdType, 4> GetFace(const int ijk[3], bool minFace, FaceMode faceMode)
1596 {
1597 const int& axis = this->CurrentAxis;
1598 const int& iAxis = this->IAxis;
1599 const int& jAxis = this->JAxis;
1600
1601 int ptIjk[3] = { ijk[0], ijk[1], ijk[2] };
1602 if (!minFace)
1603 {
1604 ++ptIjk[axis];
1605 }
1606
1607 std::array<TInputIdType, 4> face;
1608 face[0] =
1609 static_cast<TInputIdType>(vtkStructuredData::ComputePointIdForExtent(this->Extent, ptIjk));
1610
1611 ++ptIjk[iAxis];
1612 face[1] =
1613 static_cast<TInputIdType>(vtkStructuredData::ComputePointIdForExtent(this->Extent, ptIjk));
1614
1615 ++ptIjk[jAxis];
1616 face[2] =
1617 static_cast<TInputIdType>(vtkStructuredData::ComputePointIdForExtent(this->Extent, ptIjk));
1618
1619 --ptIjk[iAxis];
1620 face[3] =
1621 static_cast<TInputIdType>(vtkStructuredData::ComputePointIdForExtent(this->Extent, ptIjk));
1622
1623 if (minFace || faceMode == FaceMode::WHOLE_FACE)
1624 {
1625 // invert face order to get an outside pointing normal.
1626 std::swap(face[1], face[3]);
1627 }
1628 return face;
1629 }
1630
1631 void FaceOperator(vtkIdType faceBeginCellId, vtkIdType faceEndCellId)
1632 {

Callers 14

FaceOperatorMethod · 0.95
ExtractDSCellGeometryFunction · 0.45
ExtractCellGeometryFunction · 0.45
MarkUGCellFunction · 0.45
operator()Method · 0.45
DataSetExecuteMethod · 0.45
ConvexMethod · 0.45

Calls 1

swapFunction · 0.50

Tested by

no test coverage detected