69 return ((
Mesh *)ob->
data)->edit_mesh;
82 const int looptris_tot_prev_alloc = em->
looptris ?
92 ((looptris_tot_prev_alloc >= looptris_tot) &&
93 (looptris_tot_prev_alloc <= looptris_tot * 2))) {
100 looptris =
MEM_mallocN(
sizeof(*looptris) * looptris_tot, __func__);
104 em->
tottri = looptris_tot;
117 if (em->mesh_eval_final && em->mesh_eval_final == em->mesh_eval_cage) {
120 else if (em->mesh_eval_final) {
131 .face_normals =
false,
139 .face_normals =
true,
143 .face_normals = false,
162 .face_normals =
false,
172 .face_normals =
true,
177 .face_normals = false,
202 const float UNUSED(no[3]))
226 data.totvert = em->bm->totvert;
235 *r_vert_len = em->bm->totvert;
246 bool *r_is_alloc))[3]
259 else if ((editmesh_eval_final !=
NULL) &&
318 return object->runtime.editmesh_bb_cage;
typedef float(TangentPoint)[2]
struct Mesh * editbmesh_get_eval_cage(struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *obedit, struct BMEditMesh *em, const struct CustomData_MeshMasks *dataMask)
CustomData interface, see also DNA_customdata_types.h.
bool CustomData_has_layer(const struct CustomData *data, int type)
const CustomData_MeshMasks CD_MASK_BAREMESH
void BKE_mesh_foreach_mapped_vert(struct Mesh *mesh, void(*func)(void *userData, int index, const float co[3], const float no[3]), void *userData, MeshForeachFlag flag)
const struct MLoopTri * BKE_mesh_runtime_looptri_ensure(const struct Mesh *mesh)
bool BKE_mesh_wrapper_minmax(const struct Mesh *me, float min[3], float max[3])
General operations, lookup, etc. for blender objects.
struct Mesh * BKE_object_get_editmesh_eval_final(const struct Object *object)
void BKE_boundbox_init_from_minmax(struct BoundBox *bb, const float min[3], const float max[3])
#define BLI_BITMAP_NEW(_num, _alloc_string)
#define BLI_BITMAP_TEST(_bitmap, _index)
#define BLI_BITMAP_ENABLE(_bitmap, _index)
MINLINE int poly_to_tri_count(int poly_count, int corner_count)
MINLINE void copy_v3_v3(float r[3], const float a[3])
#define INIT_MINMAX(min, max)
struct Depsgraph Depsgraph
struct Object * DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object)
These structs are the foundation for all linked lists in the library system.
Object is a sort of wrapper for general info.
Read Guarded memory(de)allocation.
BMesh * BM_mesh_copy(BMesh *bm_old)
ATTR_WARN_UNUSED_RESULT BMesh * bm
void BM_mesh_free(BMesh *bm)
BMesh Free Mesh.
float(* BM_mesh_vert_coords_alloc(BMesh *bm, int *r_vert_len))[3]
void BM_mesh_normals_update_with_partial_ex(BMesh *UNUSED(bm), const BMPartialUpdate *bmpinfo, const struct BMeshNormalsUpdate_Params *params)
void BM_mesh_normals_update_ex(BMesh *bm, const struct BMeshNormalsUpdate_Params *params)
BMesh Compute Normals.
void BM_lnorspace_update(BMesh *bm)
void BM_edges_sharp_from_angle_set(BMesh *bm, const float split_angle)
void BM_mesh_calc_tessellation_ex(BMesh *bm, BMLoop *(*looptris)[3], const struct BMeshCalcTessellation_Params *params)
void BM_mesh_calc_tessellation_with_partial_ex(BMesh *bm, BMLoop *(*looptris)[3], const BMPartialUpdate *bmpinfo, const struct BMeshCalcTessellation_Params *params)
const Depsgraph * depsgraph
void BKE_editmesh_free_data(BMEditMesh *em)
void BKE_editmesh_ensure_autosmooth(BMEditMesh *em, Mesh *me)
BoundBox * BKE_editmesh_cage_boundbox_get(struct Object *object, BMEditMesh *UNUSED(em))
void BKE_editmesh_looptri_calc(BMEditMesh *em)
static void editmesh_tessface_calc_intern(BMEditMesh *em, const struct BMeshCalcTessellation_Params *params)
void BKE_editmesh_looptri_and_normals_calc(BMEditMesh *em)
static void cage_mapped_verts_callback(void *userData, int index, const float co[3], const float UNUSED(no[3]))
void BKE_editmesh_looptri_and_normals_calc_with_partial(BMEditMesh *em, struct BMPartialUpdate *bmpinfo)
void BKE_editmesh_lnorspace_update(BMEditMesh *em, Mesh *me)
BMEditMesh * BKE_editmesh_create(BMesh *bm)
void BKE_editmesh_looptri_calc_ex(BMEditMesh *em, const struct BMeshCalcTessellation_Params *params)
const float(* BKE_editmesh_vert_coords_when_deformed(struct Depsgraph *depsgraph, BMEditMesh *em, struct Scene *scene, Object *ob, int *r_vert_len, bool *r_is_alloc))[3]
BMEditMesh * BKE_editmesh_copy(BMEditMesh *em)
float(* BKE_editmesh_vert_coords_alloc_orco(BMEditMesh *em, int *r_vert_len))[3]
void BKE_editmesh_looptri_calc_with_partial(BMEditMesh *em, struct BMPartialUpdate *bmpinfo)
float(* BKE_editmesh_vert_coords_alloc(struct Depsgraph *depsgraph, BMEditMesh *em, struct Scene *scene, Object *ob, int *r_vert_len))[3]
BMEditMesh * BKE_editmesh_from_object(Object *ob)
Return the BMEditMesh for a given object.
void BKE_editmesh_looptri_calc_with_partial_ex(BMEditMesh *em, struct BMPartialUpdate *bmpinfo, const struct BMeshCalcTessellation_Params *params)
void(* MEM_freeN)(void *vmemh)
size_t(* MEM_allocN_len)(const void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
struct BMLoop *(* looptris)[3]
BLI_bitmap * visit_bitmap
const float(* vertexCos)[3]
struct EditMeshData * edit_data
struct BoundBox * editmesh_bb_cage
struct Mesh * editmesh_eval_cage