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

Method MinEdgeF

Filters/General/vtkBoxClipDataSet.cxx:684–758  ·  view source on GitHub ↗

------------------------------------------------------------------------------ CellGrid: Subdivide cells in consistent tetrahedra. Case : Voxel(11) or Hexahedron(12). MinEdgF search the smallest vertex index in linear order of a face(4 vertices)

Source from the content-addressed store, hash-verified

682// MinEdgF search the smallest vertex index in linear order of a face(4 vertices)
683//
684void vtkBoxClipDataSet::MinEdgeF(
685 const unsigned int* id_v, const vtkIdType* cellIds, unsigned int* edgF)
686{
687
688 int i;
689 unsigned int id;
690 int ids;
691 int min_f;
692
693 ids = 0;
694 id = id_v[0]; // Face index
695 min_f = cellIds[id_v[0]];
696
697 for (i = 1; i < 4; i++)
698 {
699 if (min_f > cellIds[id_v[i]])
700 {
701 min_f = cellIds[id_v[i]];
702 id = id_v[i];
703 ids = i;
704 }
705 }
706
707 switch (ids)
708 {
709 case 0:
710 if (id < id_v[2])
711 {
712 edgF[0] = id;
713 edgF[1] = id_v[2];
714 }
715 else
716 {
717 edgF[0] = id_v[2];
718 edgF[1] = id;
719 }
720 break;
721 case 1:
722 if (id < id_v[3])
723 {
724 edgF[0] = id;
725 edgF[1] = id_v[3];
726 }
727 else
728 {
729 edgF[0] = id_v[3];
730 edgF[1] = id;
731 }
732 break;
733 case 2:
734 if (id < id_v[0])
735 {
736 edgF[0] = id;
737 edgF[1] = id_v[0];
738 }
739 else
740 {
741 edgF[0] = id_v[0];

Callers 1

CellGridMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected