add some sugar

This commit is contained in:
papush! 2021-10-02 12:03:23 +02:00
parent 45357d3771
commit fb86669559

View File

@ -14,6 +14,27 @@ struct MyTraits : public OpenMesh::DefaultTraits {
typedef OpenMesh::Vec3f Color; typedef OpenMesh::Vec3f Color;
}; };
typedef OpenMesh::PolyMesh_ArrayKernelT<MyTraits> MyMesh; typedef OpenMesh::PolyMesh_ArrayKernelT<MyTraits> MyMesh;
typedef MyMesh::FaceHandle FaceHandle;
typedef MyMesh::VertexHandle VertexHandle;
typedef MyMesh::HalfedgeHandle HalfedgeHandle;
typedef MyMesh::EdgeHandle EdgeHandle;
typedef MyMesh::Point Point;
class HalfedgeLoopRange {
MyMesh &mesh;
const HalfedgeHandle &start;
public:
HalfedgeLoopRange(MyMesh &mesh, const HalfedgeHandle &start)
:mesh(mesh), start(start) {}
MyMesh::HalfedgeLoopIter begin() {
return mesh.hl_begin(start);
}
MyMesh::HalfedgeLoopIter end() {
return mesh.hl_end(start);
}
};
#endif #endif