Revision 8c90648f07f68d37b9b0ad0581e44fa069aa758a authored by unlin on 24 October 2019, 15:04:51 UTC, committed by GitHub on 24 October 2019, 15:04:51 UTC
1 parent 401a216
mesh_segmentation.hpp
#ifndef MESHSEGMENTATION_H
#define MESHSEGMENTATION_H
#include <vector>
#include <unordered_map>
#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<TriMesh *> ComponentSegmentation(TriMesh *pMesh, OpenMesh::FPropHandleT<unsigned int> fPropComponentID);
static void FreeSubmeshVector(std::vector<TriMesh *> &pSubmeshes);
private:
static void AddFace(TriMesh *pMesh, TriMesh *pSubmesh, std::unordered_map<int, int> &pVertexHandleMap, OpenMesh::FaceHandle pFace);
};
} // namespace bwabstraction
#endif // MESHSEGMENTATION_H

Computing file changes ...