27#ifndef EASY3D_ALGO_SURFACE_MESH_POLYGONIZATION_H
28#define EASY3D_ALGO_SURFACE_MESH_POLYGONIZATION_H
30#include <easy3d/core/surface_mesh.h>
64 void internal_apply(
SurfaceMesh *mesh,
float angle_threshold);
66 typedef std::vector<SurfaceMesh::Halfedge> Loop;
67 std::vector<Loop> extract_boundary_loop(
const SurfaceMesh *mesh,
int comp_id, std::set<SurfaceMesh::Halfedge>& boundary_edges);
70 void classify(
const SurfaceMesh *mesh,
const std::vector<Loop>& loops, Loop& outer, std::vector<Loop>& holes);
73 typedef std::vector<SurfaceMesh::Vertex> Contour;
74 std::vector<Contour> split_complex_contour(
75 const Contour &outer_poly,
76 const std::vector<Contour> &hole_polys,
A halfedge data structure for polygonal meshes of 2-manifold.
Definition: surface_mesh.h:52
Merge connected coplanar faces into a general polygon face.
Definition: surface_mesh_polygonization.h:40
void merge_colinear_edges(SurfaceMesh *mesh, float angle_threshold=1.0f)
Removes 2-degree vertices.
Definition: surface_mesh_polygonization.cpp:357
void apply(SurfaceMesh *mesh, float angle_threshold=1.0f)
Merges connected coplanar faces into a general polygon face.
Definition: surface_mesh_polygonization.cpp:39
Definition: collider.cpp:182