Commit Graph

25 Commits

Author SHA1 Message Date
b333a7570f Cleanup: spelling 2015-10-07 15:02:06 +11:00
b986f955e9 Disable assert for polyfill
Would fail on some zero-area ngons.
2015-06-16 21:13:22 +10:00
e6ceecdf97 Cleanup: pep8, spelling 2015-04-22 16:26:54 +10:00
01c04333f5 Fix T43034: beautify-fill leaves zero area tri's 2014-12-27 16:47:42 +11:00
fa1e6c5442 Fix T41986: polyfill fails with axis aligned verts 2014-09-28 21:11:16 +10:00
a319469260 Correct last commit 2014-09-14 17:42:33 +10:00
432d274990 Cleanup & typo in assignment 2014-09-14 17:27:31 +10:00
00b29156e0 Defines: replace ELEM3-16 with ELEM(...), that can take varargs 2014-07-20 01:33:40 +10:00
a64e9ba83f Polyfill2d: Correct boundbox check (Fix T40777) 2014-06-24 15:32:49 +10:00
a6e290166b Quiet warning 2014-06-17 02:08:10 +10:00
746f0ad257 Polyfill2d: use kd-tree
Simple search for intersections became slow for larger concave ngons (100+)
Tested to work with ngons up to 75k sides, performance is approx ~6x faster then scanfill.

This is a 2D version of BLI_kdtree with modifications:
- nodes can be removed
- an index -> node map is stored (especially for tessellation)
2014-06-14 08:27:19 +10:00
19b1da2b7b Polyfill2d: avoid calculating polygon winding (its known in all cases) 2014-06-14 08:21:52 +10:00
7529e36f49 Polyfill2d: Switch directions on concave triangles
Better topology and minor speedup
2014-06-14 08:21:51 +10:00
f0f45eea2e Polyfill2d: replace array with linklist, faster resizing
approx 4.0x speedup
2014-06-14 08:21:51 +10:00
09b0eadadd Add debug define for timing polyfill 2014-05-31 21:37:51 +10:00
2191590711 Polyfill: simply re-ordering checks gives ~%15 speedup 2014-05-20 17:21:57 +10:00
48881ad1e0 Code cleanup: doxy comments 2014-05-14 15:00:47 +10:00
20a4e33837 Code cleanup: use consistent arg order for math api poly funcs 2014-03-27 08:30:14 +11:00
ec4e12d9a2 Code cleanup: comments and typos 2014-03-18 05:40:18 +11:00
61ff3dfdda Code Cleanup: spelling 2014-01-13 15:31:57 +11:00
db8293d456 Polyfill: minor changes to which fix rare errors with float precision 2013-12-26 12:21:40 +11:00
af32c1c77b Fix T37946: Error filling ngons 2013-12-26 12:06:52 +11:00
f64ae4cbe5 MemArena: use size_t instead of int for alloc args and internal storage.
also add BLI_memarena_calloc to be used when calloc isnt enabled for the arena.
2013-12-02 17:51:27 +11:00
4436620150 Polyfill: fast-path for convex ngons (and mostly convex ngons).
avoid intersection checks where there are no concave coords.
2013-12-02 15:56:14 +11:00
b9445106b2 Geometry API: polyfill2d, ear clipping polygon filling functions.
Simple/predictable polygon filling functions (no hole support)
originally from libgdx which have some advantages over scanfill.

- always creates the same number of triangles (never any missing faces).
- gives same results for any affine transformation.
- doesn't give so many skinny faces by default.

made some changes for Blender.
- remove last ears first (less to memmove)
- step over the ears while clipping to avoid some verts becoming fans to most of the other.
2013-11-30 22:00:01 +11:00