diff options
Diffstat (limited to 'source/blender/blenkernel/BKE_editmesh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_editmesh.h | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/source/blender/blenkernel/BKE_editmesh.h b/source/blender/blenkernel/BKE_editmesh.h index 2c24b1a5487..1da7ae3da8a 100644 --- a/source/blender/blenkernel/BKE_editmesh.h +++ b/source/blender/blenkernel/BKE_editmesh.h @@ -19,7 +19,7 @@ /** \file * \ingroup bke * - * The \link edmesh EDBM module\endlink is for editmode bmesh stuff. + * The \link edmesh EDBM module \endlink is for editmode bmesh stuff. * In contrast, this module is for code shared with blenkernel that's * only concerned with low level operations on the #BMEditMesh structure. */ @@ -62,14 +62,6 @@ typedef struct BMEditMesh { struct BMLoop *(*looptris)[3]; int tottri; - struct Mesh *mesh_eval_final, *mesh_eval_cage; - - /** Cached cage bounding box of `mesh_eval_cage` for selection. */ - struct BoundBox *bb_cage; - - /** Evaluated mesh data-mask. */ - CustomData_MeshMasks lastDataMask; - /** Selection mode (#SCE_SELECT_VERTEX, #SCE_SELECT_EDGE & #SCE_SELECT_FACE). */ short selectmode; /** The active material (assigned to newly created faces). */ @@ -102,12 +94,28 @@ 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,8 +132,11 @@ 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); +struct BoundBox *BKE_editmesh_cage_boundbox_get(struct Object *object, BMEditMesh *em); #ifdef __cplusplus } |