Blender  V3.3
BKE_mesh_runtime.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 #pragma once
4 
11 //#include "BKE_customdata.h" /* for eCustomDataMask */
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 struct CustomData;
19 struct Depsgraph;
20 struct KeyBlock;
21 struct MLoop;
22 struct MLoopTri;
23 struct MVertTri;
24 struct Mesh;
25 struct Object;
26 struct Scene;
27 
51 const struct MLoopTri *BKE_mesh_runtime_looptri_ensure(const struct Mesh *mesh);
62 
63 /* This is a copy of DM_verttri_from_looptri(). */
65  const struct MLoop *mloop,
66  const struct MLoopTri *looptri,
67  int looptri_num);
68 
69 /* NOTE: the functions below are defined in DerivedMesh.cc, and are intended to be moved
70  * to a more suitable location when that file is removed.
71  * They should also be renamed to use conventions from BKE, not old DerivedMesh.cc.
72  * For now keep the names similar to avoid confusion. */
73 
75  const struct Scene *scene,
76  struct Object *ob,
77  const struct CustomData_MeshMasks *dataMask);
78 
80  const struct Scene *scene,
81  struct Object *ob,
82  const struct CustomData_MeshMasks *dataMask);
83 
85  const struct Scene *scene,
86  struct Object *ob,
87  const struct CustomData_MeshMasks *dataMask);
88 
90  const struct Scene *scene,
91  struct Object *ob,
92  const struct CustomData_MeshMasks *dataMask);
94  const struct Scene *scene,
95  struct Object *ob,
96  const struct CustomData_MeshMasks *dataMask);
97 
98 void BKE_mesh_runtime_eval_to_meshkey(struct Mesh *me_deformed,
99  struct Mesh *me,
100  struct KeyBlock *kb);
101 
102 #ifndef NDEBUG
103 bool BKE_mesh_runtime_is_valid(struct Mesh *me_eval);
104 #endif /* NDEBUG */
105 
106 #ifdef __cplusplus
107 }
108 #endif
void BKE_mesh_runtime_verttri_from_looptri(struct MVertTri *r_verttri, const struct MLoop *mloop, const struct MLoopTri *looptri, int looptri_num)
void BKE_mesh_runtime_eval_to_meshkey(struct Mesh *me_deformed, struct Mesh *me, struct KeyBlock *kb)
Definition: DerivedMesh.cc:390
void BKE_mesh_runtime_free_data(struct Mesh *mesh)
Free all data (and mutexes) inside the runtime of the given mesh.
Definition: mesh_runtime.cc:72
bool BKE_mesh_runtime_reset_edit_data(struct Mesh *mesh)
struct Mesh * mesh_get_eval_deform(struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask)
void BKE_mesh_runtime_clear_cache(struct Mesh *mesh)
This function clears runtime cache of the given mesh.
Definition: mesh_runtime.cc:99
void BKE_mesh_runtime_init_data(struct Mesh *mesh)
Initialize the runtime of the given mesh.
Definition: mesh_runtime.cc:67
const struct MLoopTri * BKE_mesh_runtime_looptri_ensure(const struct Mesh *mesh)
void BKE_mesh_runtime_reset_on_copy(struct Mesh *mesh, int flag)
struct Mesh * mesh_create_eval_final(struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask)
bool BKE_mesh_runtime_clear_edit_data(struct Mesh *mesh)
void BKE_mesh_runtime_clear_geometry(struct Mesh *mesh)
bool BKE_mesh_runtime_is_valid(struct Mesh *me_eval)
void BKE_mesh_runtime_looptri_recalc(struct Mesh *mesh)
int BKE_mesh_runtime_looptri_len(const struct Mesh *mesh)
struct Mesh * mesh_create_eval_no_deform_render(struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask)
struct Mesh * mesh_get_eval_final(struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask)
struct Mesh * mesh_create_eval_no_deform(struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask)
bool BKE_mesh_runtime_ensure_edit_data(struct Mesh *mesh)
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
Scene scene
const Depsgraph * depsgraph
short flag