Easy3D 2.6.1
|
Merge connected coplanar faces into a general polygon face. More...
#include <easy3d/algo/surface_mesh_polygonization.h>
Public Member Functions | |
void | apply (SurfaceMesh *mesh, float angle_threshold=1.0f) |
Merges connected coplanar faces into a general polygon face. | |
void | merge_colinear_edges (SurfaceMesh *mesh, float angle_threshold=1.0f) |
Removes 2-degree vertices. | |
Merge connected coplanar faces into a general polygon face.
void apply | ( | SurfaceMesh * | mesh, |
float | angle_threshold = 1.0f ) |
Merges connected coplanar faces into a general polygon face.
The result is a general polygonal mesh.
mesh | The input surface mesh. Upon return, the mesh will be modified. |
angle_threshold | Two faces sharing a common edge are considered coplanar if the dihedral angle is smaller than angle_threshold (in degrees). |
void merge_colinear_edges | ( | SurfaceMesh * | mesh, |
float | angle_threshold = 1.0f ) |
Removes 2-degree vertices.
For every 2-degree vertex, if the angle between its two incident edges is smaller than a threshold, merge the two incident edges by removing this vertex.
mesh | The input surface mesh. Upon return, the mesh will be modified. |
angle_threshold | Two edges sharing the same vertex are considered colinear if their angle is smaller than angle_threshold (in degrees). |