Polyfill Beautify: half-edge optimization
authorCampbell Barton <ideasman42@gmail.com>
Sun, 22 Oct 2017 14:15:26 +0000 (01:15 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 22 Oct 2017 14:40:03 +0000 (01:40 +1100)
commit6dfe4cbc6b8717223c631e80af6c7552576966e1
tree5fb0e2103cc6e8926370a5b1cee9a95fff4726a0
parent57a0cb797d60024357a3e3a64c1873844b0178bd
Polyfill Beautify: half-edge optimization

Was using an edge hash for triangle -> edge lookups,
updating triangle indices for each edge-rotation.

Replace this with half-edge which can rotate edges much more simply,
writing triangles back once the solution has been calculated.

Gives ~33% speedup in own tests.
source/blender/blenlib/BLI_polyfill2d_beautify.h
source/blender/blenlib/intern/polyfill2d_beautify.c
source/blender/bmesh/intern/bmesh_polygon.c
source/blender/bmesh/intern/bmesh_polygon.h
source/blender/bmesh/operators/bmo_connect_concave.c
source/blender/bmesh/tools/bmesh_decimate_collapse.c
source/blender/bmesh/tools/bmesh_triangulate.c
tests/gtests/blenlib/BLI_polyfill2d_test.cc