Implemented famous mesh simplification algorithm from this work :
Michael Garland and Paul S. Heckbert. Surface simplification using quadric error metrics. SIGGRAPH 1997.
Header Files:
matrix.h
: include two classes:Vec
andMat
, tool fuctions for Matrix calculationHEMesh.h
: include four structures and classesVert
、Edge
、Face
、Mesh
to describe half-edge structure of meshes. Also includes all the main fuctions to perform operations on meshes, such as edge collapse, point insertion, edge flip and mesh simplify.
Example Cpp file to utilize the functions:
A1_OBJtoHE.cpp
:read OBJ files and convert to half-edge structure. Time complexity O(n).A2.cpp
:implement edge collapse, time complexity O(1).A3.cpp
:implement point insertion, time complexity O(1).A4.cpp
:implement edge flip, time complexity O(1).B1.cpp
:find most suitable Vertex for mesh simplification. Then conduct mesh simplification with priority queues.
Other files unmentioned are trivial to core function.