Blender V5.0
BKE_subdiv_foreach.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2018 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "BLI_sys_types.h"
12
13struct Mesh;
14
15namespace blender::bke::subdiv {
16
17struct ToMeshSettings;
18struct ForeachContext;
19struct Subdiv;
20
21using ForeachTopologyInformationCb = bool (*)(const ForeachContext *context,
22 int num_vertices,
23 int num_edges,
24 int num_loops,
25 int num_faces,
26 const int *subdiv_face_offset);
27
28using ForeachVertexFromCornerCb = void (*)(const ForeachContext *context,
29 void *tls,
30 int ptex_face_index,
31 float u,
32 float v,
33 int coarse_vertex_index,
34 int coarse_face_index,
35 int coarse_corner,
36 int subdiv_vertex_index);
37
38using ForeachVertexFromEdgeCb = void (*)(const ForeachContext *context,
39 void *tls,
40 int ptex_face_index,
41 float u,
42 float v,
43 int coarse_edge_index,
44 int coarse_face_index,
45 int coarse_corner,
46 int subdiv_vertex_index);
47
48using ForeachVertexInnerCb = void (*)(const ForeachContext *context,
49 void *tls,
50 int ptex_face_index,
51 float u,
52 float v,
53 int coarse_face_index,
54 int coarse_corner,
55 int subdiv_vertex_index);
56
57using ForeachEdgeCb = void (*)(const ForeachContext *context,
58 void *tls,
59 int coarse_edge_index,
60 int subdiv_edge_index,
61 bool is_loose,
62 int subdiv_v1,
63 int subdiv_v2);
64
65using ForeachLoopCb = void (*)(const ForeachContext *context,
66 void *tls,
67 int ptex_face_index,
68 float u,
69 float v,
70 int coarse_loop_index,
71 int coarse_face_index,
72 int coarse_corner,
73 int subdiv_loop_index,
74 int subdiv_vertex_index,
75 int subdiv_edge_index);
76
77using ForeachPolygonCb = void (*)(const ForeachContext *context,
78 void *tls,
79 int coarse_face_index,
80 int subdiv_face_index,
81 int start_loop_index,
82 int num_loops);
83
84using ForeachLooseCb = void (*)(const ForeachContext *context,
85 void *tls,
86 int coarse_vertex_index,
87 int subdiv_vertex_index);
88
89using ForeachVertexOfLooseEdgeCb = void (*)(const ForeachContext *context,
90 void *tls,
91 int coarse_edge_index,
92 float u,
93 int subdiv_vertex_index);
94
150
167 const ForeachContext *context,
168 const ToMeshSettings *mesh_settings,
169 const Mesh *coarse_mesh);
170
171} // namespace blender::bke::subdiv
ATTR_WARN_UNUSED_RESULT const BMVert * v
bool(*)(const ForeachContext *context, int num_vertices, int num_edges, int num_loops, int num_faces, const int *subdiv_face_offset) ForeachTopologyInformationCb
void(*)(const ForeachContext *context, void *tls, int coarse_vertex_index, int subdiv_vertex_index) ForeachLooseCb
bool foreach_subdiv_geometry(Subdiv *subdiv, const ForeachContext *context, const ToMeshSettings *mesh_settings, const Mesh *coarse_mesh)
void(*)(const ForeachContext *context, void *tls, int coarse_edge_index, int subdiv_edge_index, bool is_loose, int subdiv_v1, int subdiv_v2) ForeachEdgeCb
void(*)(const ForeachContext *context, void *tls, int ptex_face_index, float u, float v, int coarse_face_index, int coarse_corner, int subdiv_vertex_index) ForeachVertexInnerCb
void(*)(const ForeachContext *context, void *tls, int ptex_face_index, float u, float v, int coarse_loop_index, int coarse_face_index, int coarse_corner, int subdiv_loop_index, int subdiv_vertex_index, int subdiv_edge_index) ForeachLoopCb
void(*)(const ForeachContext *context, void *tls, int ptex_face_index, float u, float v, int coarse_edge_index, int coarse_face_index, int coarse_corner, int subdiv_vertex_index) ForeachVertexFromEdgeCb
void(*)(const ForeachContext *context, void *tls, int coarse_edge_index, float u, int subdiv_vertex_index) ForeachVertexOfLooseEdgeCb
void(*)(const ForeachContext *context, void *tls, int coarse_face_index, int subdiv_face_index, int start_loop_index, int num_loops) ForeachPolygonCb
void(*)(const ForeachContext *context, void *tls, int ptex_face_index, float u, float v, int coarse_vertex_index, int coarse_face_index, int coarse_corner, int subdiv_vertex_index) ForeachVertexFromCornerCb
ForeachTopologyInformationCb topology_info
ForeachVertexOfLooseEdgeCb vertex_of_loose_edge
ForeachVertexFromCornerCb vertex_every_corner