diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-05-28 11:18:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-05 01:35:31 +0300 |
commit | c2fa36999ff25ce2d011971a460d7efa11705e57 (patch) | |
tree | 3a4c0c34de62fdb9950e2d312c4f88bd4dc52164 /source/blender/bmesh/intern/bmesh_mesh_tessellate.h | |
parent | 00073651d420c852b271127fe453d2170471321a (diff) |
Edit Mesh: partial updates for normal and face tessellation
This patch exposes functionality for performing partial mesh updates
for normal calculation and face tessellation while transforming a mesh.
The partial update data only needs to be generated once,
afterwards the cached connectivity information can be reused
(with the exception of changing proportional editing radius).
Currently this is only used for transform, in the future it could be
used for other operators as well as the transform panel.
The best-case overall speedup while transforming geometry is about
1.45x since the time to update a small number of normals and faces is
negligible.
For an additional speedup partial face tessellation is multi-threaded,
this gives ~15x speedup on my system (timing tessellation alone).
Exact results depend on the number of CPU cores available.
Ref D11494
Reviewed By: mano-wii
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_mesh_tessellate.h')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh_tessellate.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh_tessellate.h b/source/blender/bmesh/intern/bmesh_mesh_tessellate.h index 5606a5a7e02..f68a91cb988 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_tessellate.h +++ b/source/blender/bmesh/intern/bmesh_mesh_tessellate.h @@ -20,5 +20,11 @@ * \ingroup bmesh */ +struct BMPartialUpdate; + void BM_mesh_calc_tessellation(BMesh *bm, BMLoop *(*looptris)[3]); void BM_mesh_calc_tessellation_beauty(BMesh *bm, BMLoop *(*looptris)[3]); + +void BM_mesh_calc_tessellation_with_partial(BMesh *bm, + BMLoop *(*looptris)[3], + const struct BMPartialUpdate *bmpinfo); |