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

Method IsNodeOnBoundaryOfExtent

Filters/Geometry/vtkStructuredGridConnectivity.h:669–729  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

667
668//------------------------------------------------------------------------------
669inline bool vtkStructuredGridConnectivity::IsNodeOnBoundaryOfExtent(int i, int j, int k, int ext[6])
670{
671 if (!this->IsNodeWithinExtent(i, j, k, ext))
672 {
673 return false;
674 }
675
676 bool status = false;
677 switch (this->DataDescription)
678 {
679 case vtkStructuredData::VTK_STRUCTURED_X_LINE:
680 if (i == ext[0] || i == ext[1])
681 {
682 status = true;
683 }
684 break;
685 case vtkStructuredData::VTK_STRUCTURED_Y_LINE:
686 if (j == ext[2] || j == ext[3])
687 {
688 status = true;
689 }
690 break;
691 case vtkStructuredData::VTK_STRUCTURED_Z_LINE:
692 if (k == ext[4] || k == ext[5])
693 {
694 status = true;
695 }
696 break;
697 case vtkStructuredData::VTK_STRUCTURED_XY_PLANE:
698 if ((i == ext[0] || i == ext[1]) || (j == ext[2] || j == ext[3]))
699 {
700 status = true;
701 }
702 break;
703 case vtkStructuredData::VTK_STRUCTURED_YZ_PLANE:
704 if ((j == ext[2] || j == ext[3]) || (k == ext[4] || k == ext[5]))
705 {
706 status = true;
707 }
708 break;
709 case vtkStructuredData::VTK_STRUCTURED_XZ_PLANE:
710 if ((i == ext[0] || i == ext[1]) || (k == ext[4] || k == ext[5]))
711 {
712 status = true;
713 }
714 break;
715 case vtkStructuredData::VTK_STRUCTURED_XYZ_GRID:
716 if ((i == ext[0] || i == ext[1]) || (j == ext[2] || j == ext[3]) ||
717 (k == ext[4] || k == ext[5]))
718 {
719 status = true;
720 }
721 break;
722 default:
723 std::cout << "Data description is: " << this->DataDescription << "\n";
724 std::cout.flush();
725 assert("pre: Undefined data-description!" && false);
726 } // END switch

Callers 2

IsNodeOnBoundaryMethod · 0.95

Calls 3

IsNodeWithinExtentMethod · 0.80
assertFunction · 0.50
flushMethod · 0.45

Tested by

no test coverage detected