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

Method GetFaceArray

Testing/GenericBridge/vtkBridgeCell.cxx:707–746  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Description: Return the ids of the vertices defining face `faceId'. \pre is_3d: this->GetDimension()==3 \pre valid_faceId_range: faceId>=0 && faceId GetNumberOfBoundaries(2) \post result_exists: result!=0 \post valid_size: sizeof(result)>=GetNumberOfVerticesOnFace(faceId)

Source from the content-addressed store, hash-verified

705// \post result_exists: result!=0
706// \post valid_size: sizeof(result)>=GetNumberOfVerticesOnFace(faceId)
707const vtkIdType* vtkBridgeCell::GetFaceArray(vtkIdType faceId)
708{
709 assert("pre: is_3d" && this->GetDimension() == 3);
710 assert("pre: valid_faceId_range" && faceId >= 0 && faceId < this->GetNumberOfBoundaries(2));
711
712 const vtkIdType* result = nullptr;
713
714 switch (this->GetType())
715 {
716 case VTK_HIGHER_ORDER_TETRAHEDRON:
717 result = vtkTetra::GetFaceArray(faceId);
718 break;
719 case VTK_HIGHER_ORDER_HEXAHEDRON:
720 if (this->Cell->GetCellType() == VTK_VOXEL)
721 {
722 result = vtkVoxel::GetFaceArray(faceId);
723 }
724 else
725 {
726 result = vtkHexahedron::GetFaceArray(faceId);
727 }
728 break;
729 case VTK_HIGHER_ORDER_WEDGE:
730 result = vtkWedge::GetFaceArray(faceId);
731 break;
732 case VTK_HIGHER_ORDER_PYRAMID:
733 result = vtkPyramid::GetFaceArray(faceId);
734 break;
735 case VTK_PENTAGONAL_PRISM:
736 assert("check: TODO" && 0);
737 break;
738 case VTK_HEXAGONAL_PRISM:
739 assert("check: TODO" && 0);
740 break;
741 default:
742 assert("check: impossible case" && 0);
743 break;
744 }
745 return result;
746}
747
748//------------------------------------------------------------------------------
749// Description:

Callers

nothing calls this directly

Calls 5

GetDimensionMethod · 0.95
GetNumberOfBoundariesMethod · 0.95
GetTypeMethod · 0.95
assertFunction · 0.50
GetCellTypeMethod · 0.45

Tested by

no test coverage detected