Blender  V2.93
BKE_mesh_iterators.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 #pragma once
17 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 struct Mesh;
27 
28 typedef enum MeshForeachFlag {
30  /* foreachMappedVert, foreachMappedLoop, foreachMappedFaceCenter */
33 
35  void (*func)(void *userData,
36  int index,
37  const float co[3],
38  const float no_f[3],
39  const short no_s[3]),
40  void *userData,
43  struct Mesh *mesh,
44  void (*func)(void *userData, int index, const float v0co[3], const float v1co[3]),
45  void *userData);
47  void (*func)(void *userData,
48  int vertex_index,
49  int face_index,
50  const float co[3],
51  const float no[3]),
52  void *userData,
55  struct Mesh *mesh,
56  void (*func)(void *userData, int index, const float cent[3], const float no[3]),
57  void *userData,
60  struct Mesh *mesh,
61  void (*func)(void *userData, int index, const float cent[3], const float no[3]),
62  void *userData,
64 
66  float (*r_cos)[3],
67  const int totcos);
68 
69 #ifdef __cplusplus
70 }
71 #endif
void BKE_mesh_foreach_mapped_edge(struct Mesh *mesh, void(*func)(void *userData, int index, const float v0co[3], const float v1co[3]), void *userData)
void BKE_mesh_foreach_mapped_loop(struct Mesh *mesh, void(*func)(void *userData, int vertex_index, int face_index, const float co[3], const float no[3]), void *userData, MeshForeachFlag flag)
MeshForeachFlag
@ MESH_FOREACH_NOP
@ MESH_FOREACH_USE_NORMAL
void BKE_mesh_foreach_mapped_subdiv_face_center(struct Mesh *mesh, void(*func)(void *userData, int index, const float cent[3], const float no[3]), void *userData, MeshForeachFlag flag)
void BKE_mesh_foreach_mapped_face_center(struct Mesh *mesh, void(*func)(void *userData, int index, const float cent[3], const float no[3]), void *userData, MeshForeachFlag flag)
void BKE_mesh_foreach_mapped_vert(struct Mesh *mesh, void(*func)(void *userData, int index, const float co[3], const float no_f[3], const short no_s[3]), void *userData, MeshForeachFlag flag)
void BKE_mesh_foreach_mapped_vert_coords_get(struct Mesh *me_eval, float(*r_cos)[3], const int totcos)
size_t index
Definition: geometry.h:114
short flag