// The set of cells this helper points to KeyCellSet Path::cells() const { KeyCellSet res; switch(type()) { case SingleVertex: res << vertex_; break; case OpenHalfedgeList: for(int i=0; i<size(); ++i) { KeyHalfedge he = halfedges_[i]; res << he.startVertex() << he.edge; } res << halfedges_.last().endVertex(); break; case Invalid: break; } return res; }
// The set of cells this helper points to KeyCellSet Cycle::cells() const { KeyCellSet res; switch(type()) { case SingleVertex: res << vertex_; break; case ClosedHalfedge: res << halfedges_[0].edge; break; case OpenHalfedgeList: for(int i=0; i<size(); ++i) { KeyHalfedge he = halfedges_[i]; res << he.startVertex() << he.edge; } break; case Invalid: break; } return res; }