Example #1
0
int main()
{
      long int t;
      long int n;
      long int m;
      scanf("%ld", &t);
      while (t--) {
            scanf("%ld %ld", &n, &m);
            printf("%d\n", etf(n, m));
      }
      return 0;
}
void MNMesh_selectFaceLoops(MNMesh *mesh, int startid, BitArray &facesel)
{
  BitArray secondarysel(mesh->ENum());
  BitArray ringsel(mesh->ENum());
  facesel.SetSize(mesh->FNum());

  mesh->getEdgeSel(secondarysel);
  // convert to Edge
  MNFace *face = mesh->F(startid);
  for (int d = 0; d < face->deg; d++){
    ringsel.Set(face->edg[d]);
  }
  // ring
  mesh->SelectEdgeRing(ringsel);

  // back to face
  BitArrayEdgeToFace etf(mesh,&facesel);
  SM_BITARRAY_ENUMSET(ringsel,etf,BitArrayEdgeToFace);
  mesh->FaceSelect(facesel);

  // restor old edges
  mesh->EdgeSelect(secondarysel);
}