#ifndef MESHSEGMENTATION_H #define MESHSEGMENTATION_H #include #include #include "trimesh.hpp" namespace bwabstraction { /** * @brief The MeshSegmentation class implements mesh segmentation algorithms for TriMesh objects. * Given a TriMesh object, the MeshSegmentation class provides methods to segment it into submeshes. * The result submeshes are returned as a vector of TriMesh objects. */ class MeshSegmentation { public: static std::vector ComponentSegmentation(TriMesh *pMesh, OpenMesh::FPropHandleT fPropComponentID); static void FreeSubmeshVector(std::vector &pSubmeshes); private: static void AddFace(TriMesh *pMesh, TriMesh *pSubmesh, std::unordered_map &pVertexHandleMap, OpenMesh::FaceHandle pFace); }; } // namespace bwabstraction #endif // MESHSEGMENTATION_H