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>2019-08-08 22:27:49 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-08-08 22:44:27 +0300
commit634621d54db71eb78ebbb6fe90ec469f4812c4e0 (patch)
tree6162955896e9f585287eeca7aa9714aa0a009ab8 /source/blender/bmesh/intern/bmesh_polygon.h
parent1eead85cdc2789728bdb7bd4c99b29bf0d2f046c (diff)
BMesh: add utility to calculate normal from a vertex cloud
Extract from BM_verts_sort_radial_plane & simplify.
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_polygon.h')
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_polygon.h b/source/blender/bmesh/intern/bmesh_polygon.h
index 191ebd86f4a..2ae32777a7d 100644
--- a/source/blender/bmesh/intern/bmesh_polygon.h
+++ b/source/blender/bmesh/intern/bmesh_polygon.h
@@ -38,6 +38,11 @@ float BM_face_calc_normal_vcos(const BMesh *bm,
const BMFace *f,
float r_no[3],
float const (*vertexCos)[3]) ATTR_NONNULL();
+
+void BM_verts_calc_normal_from_cloud_ex(
+ BMVert **varr, int varr_len, float r_normal[3], float r_center[3], int *r_index_tangent);
+void BM_verts_calc_normal_from_cloud(BMVert **varr, int varr_len, float r_normal[3]);
+
float BM_face_calc_normal_subset(const BMLoop *l_first, const BMLoop *l_last, float r_no[3])
ATTR_NONNULL();
float BM_face_calc_area(const BMFace *f) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();