Blender  V2.93
BKE_mesh_runtime.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
19 #pragma once
20 
27 //#include "BKE_customdata.h" /* for CustomDataMask */
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 struct CustomData;
35 struct Depsgraph;
36 struct KeyBlock;
37 struct MLoop;
38 struct MLoopTri;
39 struct MVertTri;
40 struct Mesh;
41 struct Object;
42 struct Scene;
43 
44 void BKE_mesh_runtime_reset(struct Mesh *mesh);
45 void BKE_mesh_runtime_reset_on_copy(struct Mesh *mesh, const int flag);
48 const struct MLoopTri *BKE_mesh_runtime_looptri_ensure(struct Mesh *mesh);
54 
56  const struct MLoop *mloop,
57  const struct MLoopTri *looptri,
58  int looptri_num);
59 
60 /* NOTE: the functions below are defined in DerivedMesh.cc, and are intended to be moved
61  * to a more suitable location when that file is removed.
62  * They should also be renamed to use conventions from BKE, not old DerivedMesh.cc.
63  * For now keep the names similar to avoid confusion. */
65  struct Scene *scene,
66  struct Object *ob,
67  const struct CustomData_MeshMasks *dataMask);
68 
70  struct Scene *scene,
71  struct Object *ob,
72  const struct CustomData_MeshMasks *dataMask);
73 
75  struct Scene *scene,
76  struct Object *ob,
77  const struct CustomData_MeshMasks *dataMask);
78 
80  struct Scene *scene,
81  struct Object *ob,
82  const struct CustomData_MeshMasks *dataMask,
83  int index);
84 
86  struct Scene *scene,
87  struct Object *ob,
88  const struct CustomData_MeshMasks *dataMask);
90  struct Scene *scene,
91  struct Object *ob,
92  const struct CustomData_MeshMasks *dataMask);
93 
94 void BKE_mesh_runtime_eval_to_meshkey(struct Mesh *me_deformed,
95  struct Mesh *me,
96  struct KeyBlock *kb);
97 
98 #ifndef NDEBUG
99 char *BKE_mesh_runtime_debug_info(struct Mesh *me_eval);
100 void BKE_mesh_runtime_debug_print(struct Mesh *me_eval);
102 bool BKE_mesh_runtime_is_valid(struct Mesh *me_eval);
103 #endif /* NDEBUG */
104 
105 #ifdef __cplusplus
106 }
107 #endif
struct Mesh * mesh_get_eval_deform(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask)
struct Mesh * mesh_create_eval_no_deform(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask)
struct Mesh * mesh_get_eval_final(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask)
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:524
bool BKE_mesh_runtime_reset_edit_data(struct Mesh *mesh)
Definition: mesh_runtime.c:198
void BKE_mesh_runtime_debug_print(struct Mesh *me_eval)
Definition: mesh_runtime.c:357
void BKE_mesh_runtime_debug_print_cdlayers(struct CustomData *data)
Definition: mesh_runtime.c:366
void BKE_mesh_runtime_clear_cache(struct Mesh *mesh)
Definition: mesh_runtime.c:75
void BKE_mesh_runtime_reset(struct Mesh *mesh)
Definition: mesh_runtime.c:49
char * BKE_mesh_runtime_debug_info(struct Mesh *me_eval)
Definition: mesh_runtime.c:302
const struct MLoopTri * BKE_mesh_runtime_looptri_ensure(struct Mesh *mesh)
Definition: mesh_runtime.c:155
bool BKE_mesh_runtime_clear_edit_data(struct Mesh *mesh)
Definition: mesh_runtime.c:213
struct Mesh * mesh_create_eval_no_deform_render(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask)
void BKE_mesh_runtime_clear_geometry(struct Mesh *mesh)
Definition: mesh_runtime.c:226
bool BKE_mesh_runtime_is_valid(struct Mesh *me_eval)
Definition: mesh_runtime.c:392
struct Mesh * mesh_create_eval_final_index_render(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask, int index)
void BKE_mesh_runtime_looptri_recalc(struct Mesh *mesh)
Definition: mesh_runtime.c:127
int BKE_mesh_runtime_looptri_len(const struct Mesh *mesh)
struct Mesh * mesh_create_eval_final(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask)
void BKE_mesh_runtime_reset_on_copy(struct Mesh *mesh, const int flag)
bool BKE_mesh_runtime_ensure_edit_data(struct Mesh *mesh)
Definition: mesh_runtime.c:188
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:51
size_t index
Definition: geometry.h:114
Scene scene
const Depsgraph * depsgraph
short flag