Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-06-14 15:56:03 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-06-14 16:01:19 +0300
commit8a1860bd9aecddf611b64e3e842bdc8c76f15cc6 (patch)
tree52afad79ca08551fa22bb35d082719299f0476ef /source/blender/editors/include/ED_mesh.h
parent6bef2559047461794eb3ff27de15f4caf5ddcf1e (diff)
BMesh: support face-normal calculation in normal & looptri functions
Support calculating face normals when tessellating. When this is done before updating vertex normals it gives ~20% performance improvement. Now vertex normal calculation only needs to perform a single pass on the mesh vertices when called after tessellation. Extended versions of normal & looptri update functions have been added: - BM_mesh_calc_tessellation_ex - BM_mesh_normals_update_ex Most callers don't need to be aware of this detail by using: - BKE_editmesh_looptri_and_normals_calc - BKE_editmesh_looptri_and_normals_calc_with_partial - EDBM_update also takes advantage of this, where calling EDBM_update with calc_looptri & calc_normals enabled uses the faster normal updating logic.
Diffstat (limited to 'source/blender/editors/include/ED_mesh.h')
-rw-r--r--source/blender/editors/include/ED_mesh.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h
index b76c35c7d7a..0e2be5eb568 100644
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@ -36,6 +36,7 @@ struct BMFace;
struct BMLoop;
struct BMVert;
struct BMesh;
+struct BMeshNormalsUpdate_Params;
struct Base;
struct Depsgraph;
struct ID;
@@ -76,6 +77,8 @@ struct BMFace *EDBM_verts_mirror_get_face(struct BMEditMesh *em, struct BMFace *
void EDBM_verts_mirror_cache_clear(struct BMEditMesh *em, struct BMVert *v);
void EDBM_verts_mirror_cache_end(struct BMEditMesh *em);
+void EDBM_mesh_normals_update_ex(struct BMEditMesh *em,
+ const struct BMeshNormalsUpdate_Params *params);
void EDBM_mesh_normals_update(struct BMEditMesh *em);
void EDBM_mesh_clear(struct BMEditMesh *em);