From ffc4c126f5416b04a01653e7a03451797b98aba4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Dec 2021 17:19:15 +1100 Subject: Cleanup: move public doc-strings into headers for 'blenkernel' - Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. - Minor improvements to doc-strings. Ref T92709 --- source/blender/blenkernel/BKE_editmesh.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'source/blender/blenkernel/BKE_editmesh.h') diff --git a/source/blender/blenkernel/BKE_editmesh.h b/source/blender/blenkernel/BKE_editmesh.h index 2c24b1a5487..32cc5961e4a 100644 --- a/source/blender/blenkernel/BKE_editmesh.h +++ b/source/blender/blenkernel/BKE_editmesh.h @@ -102,12 +102,29 @@ void BKE_editmesh_looptri_calc_with_partial(BMEditMesh *em, struct BMPartialUpda void BKE_editmesh_looptri_and_normals_calc_with_partial(BMEditMesh *em, struct BMPartialUpdate *bmpinfo); +/** + * Performing the face normal calculation at the same time as tessellation + * gives a reasonable performance boost (approx ~20% faster). + */ void BKE_editmesh_looptri_and_normals_calc(BMEditMesh *em); +/** + * \note The caller is responsible for ensuring triangulation data, + * typically by calling #BKE_editmesh_looptri_calc. + */ BMEditMesh *BKE_editmesh_create(BMesh *bm); BMEditMesh *BKE_editmesh_copy(BMEditMesh *em); +/** + * \brief Return the #BMEditMesh for a given object + * + * \note this function assumes this is a mesh object, + * don't add NULL data check here. caller must do that + */ BMEditMesh *BKE_editmesh_from_object(struct Object *ob); void BKE_editmesh_free_derived_caches(BMEditMesh *em); +/** + * \note Does not free the #BMEditMesh struct itself. + */ void BKE_editmesh_free_data(BMEditMesh *em); float (*BKE_editmesh_vert_coords_alloc(struct Depsgraph *depsgraph, @@ -124,6 +141,9 @@ const float (*BKE_editmesh_vert_coords_when_deformed(struct Depsgraph *depsgraph bool *r_is_alloc))[3]; void BKE_editmesh_lnorspace_update(BMEditMesh *em, struct Mesh *me); +/** + * If auto-smooth not already set, set it. + */ void BKE_editmesh_ensure_autosmooth(BMEditMesh *em, struct Mesh *me); struct BoundBox *BKE_editmesh_cage_boundbox_get(BMEditMesh *em); -- cgit v1.2.3