#ifndef MY_MESH_H #define MY_MESH_H #include #include #include struct MyTraits : public OpenMesh::DefaultTraits { VertexAttributes(OpenMesh::Attributes::Normal | OpenMesh::Attributes::Color); HalfedgeAttributes(OpenMesh::Attributes::PrevHalfedge); FaceAttributes(OpenMesh::Attributes::Normal); EdgeAttributes(OpenMesh::Attributes::Color); typedef OpenMesh::Vec3f Color; }; typedef OpenMesh::PolyMesh_ArrayKernelT 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