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-04-18 08:21:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-18 08:59:28 +0300
commit333cdbb41025db012239e0549a439515880aad9b (patch)
tree7f34b68d8d412bd69073eabee1ed01e2ded0437f /source/blender/bmesh
parent93e876c4f89909ff1e399d7f038aac134367b120 (diff)
Cleanup: comment blocks
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/bmesh_class.h39
-rw-r--r--source/blender/bmesh/intern/bmesh_construct.c12
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_private.h4
4 files changed, 33 insertions, 24 deletions
diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h
index 220a5b3a5f5..2cc5b1b8097 100644
--- a/source/blender/bmesh/bmesh_class.h
+++ b/source/blender/bmesh/bmesh_class.h
@@ -58,23 +58,32 @@ struct BLI_mempool;
* 4: some elements for internal record keeping.
*/
typedef struct BMHeader {
- void *data; /* customdata layers */
- int index; /* notes:
- * - Use BM_elem_index_get/set macros for index
- * - Uninitialized to -1 so we can easily tell its not set.
- * - Used for edge/vert/face/loop, check BMesh.elem_index_dirty for valid index values,
- * this is abused by various tools which set it dirty.
- * - For loops this is used for sorting during tessellation. */
-
- char htype; /* element geometric type (verts/edges/loops/faces) */
- char hflag; /* this would be a CD layer, see below */
-
- /* internal use only!
- * note,.we are very picky about not bloating this struct
+ /** Customdata layers. */
+ void *data;
+
+ /**
+ * \note
+ * - Use BM_elem_index_get/set macros for index
+ * - Uninitialized to -1 so we can easily tell its not set.
+ * - Used for edge/vert/face/loop, check BMesh.elem_index_dirty for valid index values,
+ * this is abused by various tools which set it dirty.
+ * - For loops this is used for sorting during tessellation.
+ */
+ int index;
+
+ /** Element geometric type (verts/edges/loops/faces). */
+ char htype;
+ /** This would be a CD layer, see below. */
+ char hflag;
+
+ /**
+ * Internal use only!
+ * \note We are very picky about not bloating this struct
* but in this case its padded up to 16 bytes anyway,
- * so adding a flag here gives no increase in size */
+ * so adding a flag here gives no increase in size.
+ */
char api_flag;
- // char _pad;
+ // char _pad;
} BMHeader;
BLI_STATIC_ASSERT((sizeof(BMHeader) <= 16), "BMHeader size has grown!");
diff --git a/source/blender/bmesh/intern/bmesh_construct.c b/source/blender/bmesh/intern/bmesh_construct.c
index 0528a550be4..4a4ea1e17a7 100644
--- a/source/blender/bmesh/intern/bmesh_construct.c
+++ b/source/blender/bmesh/intern/bmesh_construct.c
@@ -436,12 +436,12 @@ void BM_verts_sort_radial_plane(BMVert **vert_arr, int len)
far_cross_dist = normalize_v3(far_cross_vec);
/* more of a weight then a distance */
- far_cross_dist = (/* first we want to have a value close to zero mapped to 1 */
- 1.0f - fabsf(dot_v3v3(far_vec, far_cross_vec)) *
-
- /* second we multiply by the distance
- * so points close to the center are not preferred */
- far_cross_dist);
+ far_cross_dist = (
+ /* First we want to have a value close to zero mapped to 1. */
+ 1.0f - fabsf(dot_v3v3(far_vec, far_cross_vec)) *
+ /* Second we multiply by the distance
+ * so points close to the center are not preferred. */
+ far_cross_dist);
if (far_cross_dist > far_cross_best || far_cross == NULL) {
far_cross = vert_arr[i]->co;
diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c
index 3673c299a0c..7a42ee35440 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.c
+++ b/source/blender/bmesh/intern/bmesh_mesh.c
@@ -1038,7 +1038,7 @@ void BM_mesh_loop_normals_update(BMesh *bm,
if (use_split_normals) {
/* Tag smooth edges and set lnos from vnos when they might be completely smooth...
- * When using custom loop normals, disable the angle feature! */
+ * When using custom loop normals, disable the angle feature! */
bm_mesh_edges_sharp_tag(bm, NULL, NULL, has_clnors ? (float)M_PI : split_angle, r_lnos);
/* Finish computing lnos by accumulating face normals in each fan of faces defined by sharp edges. */
diff --git a/source/blender/bmesh/intern/bmesh_private.h b/source/blender/bmesh/intern/bmesh_private.h
index b77243f7b26..d5cbe947293 100644
--- a/source/blender/bmesh/intern/bmesh_private.h
+++ b/source/blender/bmesh/intern/bmesh_private.h
@@ -31,8 +31,8 @@
/* returns positive nonzero on error */
#ifdef NDEBUG
-/* no error checking for release,
- * it can take most of the CPU time when running some tools */
+/* No error checking for release,
+ * it can take most of the CPU time when running some tools. */
# define BM_CHECK_ELEMENT(el) (void)(el)
#else
int bmesh_elem_check(void *element, const char htype);