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.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.h')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh.h b/source/blender/bmesh/intern/bmesh_mesh.h index c1c2f17d7c1..708786a4c55 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.h +++ b/source/blender/bmesh/intern/bmesh_mesh.h @@ -25,6 +25,7 @@ struct BMAllocTemplate; struct BMLoopNorEditDataArray; struct MLoopNorSpaceArray; +struct BMPartialUpdate; void BM_mesh_elem_toolflags_ensure(BMesh *bm); void BM_mesh_elem_toolflags_clear(BMesh *bm); @@ -41,6 +42,8 @@ void BM_mesh_data_free(BMesh *bm); void BM_mesh_clear(BMesh *bm); void BM_mesh_normals_update(BMesh *bm); +void BM_mesh_normals_update_with_partial(BMesh *bm, const struct BMPartialUpdate *bmpinfo); + void BM_verts_calc_normal_vcos(BMesh *bm, const float (*fnos)[3], const float (*vcos)[3], |