void intersectedFaces(const carve::poly::Polyhedron::edge_t *e, face_set_t &f) const { std::vector<const carve::poly::Polyhedron::face_t *> intersected_faces; std::vector<const carve::poly::Polyhedron::edge_t *> intersected_edges; std::vector<const carve::poly::Polyhedron::vertex_t *> intersected_vertices; collect(e, &intersected_vertices, &intersected_edges, &intersected_faces); for (unsigned i = 0; i < intersected_vertices.size(); ++i) { facesForVertex(intersected_vertices[i], f); } for (unsigned i = 0; i < intersected_edges.size(); ++i) { facesForEdge(intersected_edges[i], f); } f.insert(intersected_faces.begin(), intersected_faces.end()); }
void intersectedFaces(vertex_t *v, face_set_t &f) const { std::vector<face_t *> intersected_faces; std::vector<edge_t *> intersected_edges; std::vector<vertex_t *> intersected_vertices; collect(v, &intersected_vertices, &intersected_edges, &intersected_faces); for (unsigned i = 0; i < intersected_vertices.size(); ++i) { facesForVertex(intersected_vertices[i], f); } for (unsigned i = 0; i < intersected_edges.size(); ++i) { facesForEdge(intersected_edges[i], f); } f.insert(intersected_faces.begin(), intersected_faces.end()); }
void facesForObject(const IObj &obj, face_set_t &faces) const { switch (obj.obtype) { case IObj::OBTYPE_VERTEX: facesForVertex(obj.vertex, faces); break; case IObj::OBTYPE_EDGE: facesForEdge(obj.edge, faces); break; case IObj::OBTYPE_FACE: facesForFace(obj.face, faces); break; default: break; } }