LEFT | RIGHT |
1 /* | 1 /* |
2 * ***** BEGIN GPL LICENSE BLOCK ***** | 2 * ***** BEGIN GPL LICENSE BLOCK ***** |
3 * | 3 * |
4 * This program is free software; you can redistribute it and/or | 4 * This program is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU General Public License | 5 * modify it under the terms of the GNU General Public License |
6 * as published by the Free Software Foundation; either version 2 | 6 * as published by the Free Software Foundation; either version 2 |
7 * of the License, or (at your option) any later version. | 7 * of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 19 matching lines...) Expand all Loading... |
30 /** \file BKE_mesh.h | 30 /** \file BKE_mesh.h |
31 * \ingroup bke | 31 * \ingroup bke |
32 */ | 32 */ |
33 | 33 |
34 /***/ | 34 /***/ |
35 | 35 |
36 struct BoundBox; | 36 struct BoundBox; |
37 struct DispList; | 37 struct DispList; |
38 struct ListBase; | 38 struct ListBase; |
39 struct EditMesh; | 39 struct EditMesh; |
40 struct MDeformVert; | |
41 struct Mesh; | 40 struct Mesh; |
| 41 struct MPoly; |
| 42 struct MLoop; |
42 struct MFace; | 43 struct MFace; |
43 struct MEdge; | 44 struct MEdge; |
44 struct MVert; | 45 struct MVert; |
| 46 struct MDeformVert; |
45 struct MCol; | 47 struct MCol; |
46 struct Object; | 48 struct Object; |
47 struct MTFace; | 49 struct MTFace; |
48 struct VecNor; | 50 struct VecNor; |
49 struct CustomData; | 51 struct CustomData; |
50 struct DerivedMesh; | 52 struct DerivedMesh; |
51 struct Scene; | 53 struct Scene; |
| 54 struct MLoopUV; |
52 struct UvVertMap; | 55 struct UvVertMap; |
53 struct UvMapVert; | 56 struct UvMapVert; |
54 struct UvElementMap; | 57 struct UvElementMap; |
55 struct UvElement; | 58 struct UvElement; |
56 | |
57 #ifdef __cplusplus | 59 #ifdef __cplusplus |
58 extern "C" { | 60 extern "C" { |
59 #endif | 61 #endif |
60 | 62 |
61 struct EditMesh *BKE_mesh_get_editmesh(struct Mesh *me); | 63 struct EditMesh *BKE_mesh_get_editmesh(struct Mesh *me); |
62 void BKE_mesh_end_editmesh(struct Mesh *me, struct EditMesh *em); | 64 void BKE_mesh_end_editmesh(struct Mesh *me, struct EditMesh *em); |
| 65 |
| 66 /* for forwards compat only quad->tri polys to mface, skip ngons. |
| 67 */ |
| 68 int mesh_mpoly_to_mface(struct CustomData *fdata, struct CustomData *ldata, |
| 69 struct CustomData *pdata, int totface, int totloop, int totpoly); |
63 | 70 |
64 void unlink_mesh(struct Mesh *me); | 71 void unlink_mesh(struct Mesh *me); |
65 void free_mesh(struct Mesh *me); | 72 void free_mesh(struct Mesh *me); |
66 struct Mesh *add_mesh(const char *name); | 73 struct Mesh *add_mesh(const char *name); |
67 struct Mesh *copy_mesh(struct Mesh *me); | 74 struct Mesh *copy_mesh(struct Mesh *me); |
68 void mesh_update_customdata_pointers(struct Mesh *me); | 75 void mesh_update_customdata_pointers(struct Mesh *me); |
69 void make_local_mesh(struct Mesh *me); | 76 void make_local_mesh(struct Mesh *me); |
70 void boundbox_mesh(struct Mesh *me, float *loc, float *size); | 77 void boundbox_mesh(struct Mesh *me, float *loc, float *size); |
71 void tex_space_mesh(struct Mesh *me); | 78 void tex_space_mesh(struct Mesh *me); |
72 float *get_mesh_orco_verts(struct Object *ob); | 79 float *get_mesh_orco_verts(struct Object *ob); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 164 |
158 UvVertMap *make_uv_vert_map(struct MFace *mface, struct MTFace *tface, unsigned
int totface, unsigned int totvert, int selected, float *limit); | 165 UvVertMap *make_uv_vert_map(struct MFace *mface, struct MTFace *tface, unsigned
int totface, unsigned int totvert, int selected, float *limit); |
159 UvMapVert *get_uv_map_vert(UvVertMap *vmap, unsigned int v); | 166 UvMapVert *get_uv_map_vert(UvVertMap *vmap, unsigned int v); |
160 void free_uv_vert_map(UvVertMap *vmap); | 167 void free_uv_vert_map(UvVertMap *vmap); |
161 | 168 |
162 /* Connectivity data */ | 169 /* Connectivity data */ |
163 typedef struct IndexNode { | 170 typedef struct IndexNode { |
164 struct IndexNode *next, *prev; | 171 struct IndexNode *next, *prev; |
165 int index; | 172 int index; |
166 } IndexNode; | 173 } IndexNode; |
167 void create_vert_face_map(ListBase **map, IndexNode **mem, const struct MFace *m
face, | 174 void create_vert_face_map(struct ListBase **map, IndexNode **mem, const struct M
Face *mface, |
168 » » » const int totvert, const int totface); | 175 const int totvert, const int totface); |
169 void create_vert_edge_map(ListBase **map, IndexNode **mem, const struct MEdge *m
edge, | 176 void create_vert_edge_map(struct ListBase **map, IndexNode **mem, const struct M
Edge *medge, |
170 » » » const int totvert, const int totedge); | 177 const int totvert, const int totedge); |
171 | |
172 /* Partial Mesh Visibility */ | |
173 struct PartialVisibility *mesh_pmv_copy(struct PartialVisibility *); | |
174 void mesh_pmv_free(struct PartialVisibility *); | |
175 void mesh_pmv_revert(struct Mesh *me); | |
176 void mesh_pmv_off(struct Mesh *me); | |
177 | 178 |
178 /* functions for making menu's from customdata layers */ | 179 /* functions for making menu's from customdata layers */ |
179 int mesh_layers_menu_charlen(struct CustomData *data, int type); /* use this to
work out how many chars to allocate */ | 180 int mesh_layers_menu_charlen(struct CustomData *data, int type); /* use this to
work out how many chars to allocate */ |
180 void mesh_layers_menu_concat(struct CustomData *data, int type, char *str); | 181 void mesh_layers_menu_concat(struct CustomData *data, int type, char *str); |
181 int mesh_layers_menu(struct CustomData *data, int type); | 182 int mesh_layers_menu(struct CustomData *data, int type); |
182 | 183 |
183 /* vertex level transformations & checks (no derived mesh) */ | 184 /* vertex level transformations & checks (no derived mesh) */ |
184 | 185 |
185 int minmax_mesh(struct Mesh *me, float min[3], float max[3]); | 186 int minmax_mesh(struct Mesh *me, float min[3], float max[3]); |
186 int mesh_center_median(struct Mesh *me, float cent[3]); | 187 int mesh_center_median(struct Mesh *me, float cent[3]); |
187 int mesh_center_bounds(struct Mesh *me, float cent[3]); | 188 int mesh_center_bounds(struct Mesh *me, float cent[3]); |
188 void mesh_translate(struct Mesh *me, float offset[3], int do_keys); | 189 void mesh_translate(struct Mesh *me, float offset[3], int do_keys); |
189 | 190 |
190 /* mesh_validate.c */ | 191 /* mesh_validate.c */ |
191 int BKE_mesh_validate_arrays(struct Mesh *me, struct MVert *mverts, unsigned int
totvert, struct MEdge *medges, unsigned int totedge, struct MFace *mfaces, unsi
gned int totface, const short do_verbose, const short do_fixes); | 192 int BKE_mesh_validate_arrays( |
| 193 » » struct Mesh *me, |
| 194 struct MVert *mverts, unsigned int totvert, |
| 195 struct MEdge *medges, unsigned int totedge, |
| 196 struct MFace *mfaces, unsigned int totface, |
| 197 struct MDeformVert *dverts, /* assume totvert length */ |
| 198 const short do_verbose, const short do_fixes); |
192 int BKE_mesh_validate(struct Mesh *me, int do_verbose); | 199 int BKE_mesh_validate(struct Mesh *me, int do_verbose); |
193 int BKE_mesh_validate_dm(struct DerivedMesh *dm); | 200 int BKE_mesh_validate_dm(struct DerivedMesh *dm); |
194 | 201 |
195 void BKE_mesh_calc_edges(struct Mesh *mesh, int update); | 202 void BKE_mesh_calc_edges(struct Mesh *mesh, int update); |
196 | 203 |
197 void BKE_mesh_ensure_navmesh(struct Mesh *me); | 204 void BKE_mesh_ensure_navmesh(struct Mesh *me); |
| 205 |
| 206 /*convert a triangle of loop facedata to mface facedata*/ |
| 207 void mesh_loops_to_mface_corners(struct CustomData *fdata, struct CustomData *ld
ata, |
| 208 struct CustomData *pdata, int lindex[4], int fi
ndex, |
| 209 const int polyindex, const int mf_len, |
| 210 const int numTex, const int numCol, const int h
asWCol); |
198 | 211 |
199 #ifdef __cplusplus | 212 #ifdef __cplusplus |
200 } | 213 } |
201 #endif | 214 #endif |
202 | 215 |
203 #endif /* BKE_MESH_H */ | 216 #endif /* BKE_MESH_H */ |
LEFT | RIGHT |