diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-06-20 17:02:09 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-20 17:05:26 +0300 |
commit | eee3529eaf444cc0db0ad46182dccab46907c361 (patch) | |
tree | 99d981e37c73409ca3d1668c658826f39c3d29c0 /source/blender/blenlib | |
parent | 859b3ff34675d51b2e8548217f8d011c2846ee70 (diff) |
Docs: improve poly_to_tri_count doc-string
It wasn't obvious this can be used for calculating the triangle index
from the polygon and loop index.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/math_geom_inline.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/blenlib/intern/math_geom_inline.c b/source/blender/blenlib/intern/math_geom_inline.c index 23c351026f2..655d3fcc4c0 100644 --- a/source/blender/blenlib/intern/math_geom_inline.c +++ b/source/blender/blenlib/intern/math_geom_inline.c @@ -244,10 +244,13 @@ MINLINE int min_axis_v3(const float vec[3]) } /** - * Simple method to find how many tri's we need when we already know the corner+poly count. + * Simple function to either: + * - Calculate how many triangles needed from the total number of polygons + loops. + * - Calculate the first triangle index from the polygon index & that polygons loop-start. * - * \param poly_count: The number of ngon's/tris (1-2 sided faces will give incorrect results) - * \param corner_count: also known as loops in BMesh/DNA + * \param poly_count: The number of polygons or polygon-index + * (3+ sided faces, 1-2 sided give incorrect results). + * \param corner_count: The number of corners (also called loop-index). */ MINLINE int poly_to_tri_count(const int poly_count, const int corner_count) { |