Logo Search packages:      
Sourcecode: madlib version File versions  Download package

pRegion MAd::M_region ( pMesh  m,
int  id[] 
)

returns the region using the vertices with these id's. Returns NULL if not found.

Definition at line 655 of file MeshDataBaseInterface.cc.

References MAd::F_region(), MAd::M_face(), MAd::R_fcOpVt(), and MAd::V_id().

  {
    pFace f = M_face(m,id);
    if ( !f ) {printf("could not find face with ids: %d %d %d\n",id[0],id[1],id[2]); return 0;}

    pRegion r; pVertex v;
    for (int i=0; i<2; i++) {
      r = F_region(f,i);
      if (r) {
        v = R_fcOpVt(r,f);
        if ( v && ( V_id(v) == id[3] ) ) return r;
      }
    }

    return 0;
  }


Generated by  Doxygen 1.6.0   Back to index