Mesh: Reimplement and unify topology maps #107861

Merged
Hans Goudey merged 14 commits from HooglyBoogly/blender:cleanup-unify-mesh-maps into main 2023-05-24 13:17:03 +02:00

14 Commits

Author SHA1 Message Date
Hans Goudey 7a89c4dff5 Add size index_range methods to GroupedSpan
buildbot/vexp-code-patch-coordinator Build done. Details
2023-05-23 12:40:26 -04:00
Hans Goudey 0d645238d5 Use this-> when accessing public members 2023-05-23 12:39:10 -04:00
Hans Goudey 17bb24d658 Fix variable namee 2023-05-23 12:38:33 -04:00
Hans Goudey 35bef167cc Add note about sharing offsets 2023-05-23 12:38:17 -04:00
Hans Goudey 3aeed6fbba Remove empty destructor 2023-05-23 12:35:52 -04:00
Hans Goudey 4f4be93f5e Merge branch 'main' into cleanup-unify-mesh-maps 2023-05-23 12:25:42 -04:00
Hans Goudey 0ab9e0b733 Merge branch 'main' into cleanup-unify-mesh-maps 2023-05-19 14:19:17 -04:00
Hans Goudey 9f2eef575d Merge branch 'main' into cleanup-unify-mesh-maps 2023-05-18 15:10:28 -04:00
Hans Goudey 6c793c6144 Merge branch 'main' into cleanup-unify-mesh-maps 2023-05-16 11:35:28 -04:00
Hans Goudey fc85707f7f Cleanup: Missing include
buildbot/vexp-code-patch-coordinator Build done. Details
2023-05-12 12:14:52 -04:00
Hans Goudey 35b4890905 Merge branch 'main' into cleanup-unify-mesh-maps 2023-05-12 12:10:23 -04:00
Hans Goudey f09fb881d9 Fix blur attribute node 2023-05-12 08:40:23 -04:00
Hans Goudey 539c039a7b Merge branch 'main' into cleanup-unify-mesh-maps 2023-05-12 08:28:09 -04:00
Hans Goudey fe1f768805 Mesh: Reimplement and unify topology maps
buildbot/vexp-code-patch-coordinator Build done. Details
Combine the newer less efficient C++ implementations and the older
less convenient C functions. The maps now contain one large array of
indices, split into groups by a separate array of offset indices.
Though performance of creating the maps is relatively unchanged, the
new implementation uses 4 bytes less per source element than the C
maps, and 20 bytes less than the newer C++ functions (which also
had move overhead with larger N-gons). The usage syntax is simpler
than the C functions as well.

The reduced memory usage is helpful for when these maps are cached
in the near future. It will also allow sharing the offsets between
maps for different domains like vertex to corner and vertex to face.

A simple `GroupedSpan` class is introduced to make accessing the
topology maps much simpler. It combines offset indices and a separate
span, splitting it into chunks in an efficient way.
2023-05-11 22:37:33 -04:00