| 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 | { |
no test coverage detected