Exemplo n.º 1
0
      void commonFaces(const vertex_set_t &verts, face_set_t &result) {

        std::set<face_t *> ifaces, temp, out;
        typename vertex_set_t::const_iterator i = verts.begin();
        if (i == verts.end()) return;
        intersectedFaces((*i), ifaces);
        while (++i != verts.end()) {
          temp.clear();
          intersectedFaces((*i), temp);

          out.clear();
          std::set_intersection(temp.begin(), temp.end(),
                                ifaces.begin(), ifaces.end(),
                                set_inserter(out));
          ifaces.swap(out);
        }
        std::copy(ifaces.begin(), ifaces.end(), set_inserter(result));
      }
 void facesForEdge(const carve::poly::Polyhedron::edge_t *e, face_set_t &faces) const {
   static_cast<const carve::poly::Polyhedron *>(e->owner)->edgeToFaces(e, set_inserter(faces));
 }
 void facesForVertex(const carve::poly::Polyhedron::vertex_t *v, face_set_t &faces) const {
   static_cast<const carve::poly::Polyhedron *>(v->owner)->vertexToFaces(v, set_inserter(faces));
 }