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-12-03 11:29:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-12-03 12:10:57 +0300
commitc4e041da23b9c45273fcd4874308c536b6a315d1 (patch)
tree9afdea81b57e801d3a1930988ebf3a2145a408bb /source/blender/bmesh/intern/bmesh_query_uv.h
parent7c4fc5b58d2e7982aefbba093cb8f1dc36b64884 (diff)
Cleanup: move public doc-strings into headers for 'bmesh'
Some minor improvements to doc-strings too. Ref T92709
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_query_uv.h')
-rw-r--r--source/blender/bmesh/intern/bmesh_query_uv.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_query_uv.h b/source/blender/bmesh/intern/bmesh_query_uv.h
index 850b27d3894..d63b8e5e701 100644
--- a/source/blender/bmesh/intern/bmesh_query_uv.h
+++ b/source/blender/bmesh/intern/bmesh_query_uv.h
@@ -27,6 +27,14 @@ float BM_loop_uv_calc_edge_length(const BMLoop *l,
const int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
+/**
+ * Computes the UV center of a face, using the mean average weighted by edge length.
+ *
+ * See #BM_face_calc_center_median_weighted for matching spatial functionality.
+ *
+ * \param aspect: Calculate the center scaling by these values, and finally dividing.
+ * Since correct weighting depends on having the correct aspect.
+ */
void BM_face_uv_calc_center_median_weighted(const BMFace *f,
const float aspect[2],
const int cd_loop_uv_offset,
@@ -34,6 +42,9 @@ void BM_face_uv_calc_center_median_weighted(const BMFace *f,
void BM_face_uv_calc_center_median(const BMFace *f, const int cd_loop_uv_offset, float r_cent[2])
ATTR_NONNULL();
+/**
+ * Calculate the UV cross product (use the sign to check the winding).
+ */
float BM_face_uv_calc_cross(const BMFace *f, const int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
@@ -46,19 +57,31 @@ bool BM_loop_uv_share_edge_check_with_limit(BMLoop *l_a,
const int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
+/**
+ * Check if two loops that share an edge also have the same UV coordinates.
+ */
bool BM_loop_uv_share_edge_check(BMLoop *l_a,
BMLoop *l_b,
const int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
+/**
+ * Check if two loops that share a vertex also have the same UV coordinates.
+ */
bool BM_edge_uv_share_vert_check(BMEdge *e, BMLoop *l_a, BMLoop *l_b, const int cd_loop_uv_offset)
ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+/**
+ * Check if two loops that share a vertex also have the same UV coordinates.
+ */
bool BM_loop_uv_share_vert_check(BMLoop *l_a,
BMLoop *l_b,
const int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
+/**
+ * Check if the point is inside the UV face.
+ */
bool BM_face_uv_point_inside_test(const BMFace *f,
const float co[2],
const int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT