Blender V5.3
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_offset_indices.hh"
12#include "BLI_span.hh"
13#include "BLI_sys_types.hh"
14
15namespace blender {
16
17struct Mesh;
18
19namespace bke::subdiv {
20
21struct ToMeshSettings;
22struct ForeachContext;
23struct Subdiv;
24
25using ForeachTopologyInformationCb = bool (*)(const ForeachContext *context,
26 int num_vertices,
27 int num_edges,
28 int num_loops,
29 int num_faces,
30 Span<int> subdiv_face_offset);
31
32using ForeachVertFromCornerCb = void (*)(const ForeachContext *context,
33 void *tls,
34 int ptex_face_index,
35 float u,
36 float v,
37 int coarse_vert_index,
38 int coarse_face_index,
39 int coarse_corner,
40 int subdiv_vert_index);
41
42using ForeachVertFromEdgeCb = void (*)(const ForeachContext *context,
43 void *tls,
44 int ptex_face_index,
45 float u,
46 float v,
47 int coarse_edge_index,
48 int coarse_face_index,
49 int coarse_corner,
50 int subdiv_vert_index);
51
52using ForeachVertInnerCb = void (*)(const ForeachContext *context,
53 void *tls,
54 int ptex_face_index,
55 float u,
56 float v,
57 int coarse_face_index,
58 int coarse_corner,
59 int subdiv_vert_index);
60
61using ForeachEdgeCb = void (*)(const ForeachContext *context,
62 void *tls,
63 int coarse_edge_index,
64 int subdiv_edge_index,
65 bool is_loose,
66 int subdiv_v1,
67 int subdiv_v2);
68
69using ForeachLoopCb = void (*)(const ForeachContext *context,
70 void *tls,
71 int ptex_face_index,
72 float u,
73 float v,
74 int coarse_loop_index,
75 int coarse_face_index,
76 int coarse_corner,
77 int subdiv_loop_index,
78 int subdiv_vert_index,
79 int subdiv_edge_index);
80
86using FacesCb = void (*)(const ForeachContext *context,
87 OffsetIndices<int> subdiv_faces_by_base_face);
88
89using ForeachLooseCb = void (*)(const ForeachContext *context,
90 void *tls,
91 int coarse_vert_index,
92 int subdiv_vert_index);
93
94using ForeachVertOfLooseEdgeCb = void (*)(const ForeachContext *context,
95 void *tls,
96 int coarse_edge_index,
97 float u,
98 int subdiv_vert_index);
99
163
179 const ForeachContext *context,
180 const ToMeshSettings *mesh_settings,
181 const Mesh *coarse_mesh);
182
183} // namespace bke::subdiv
184} // namespace blender
bool(*)(const ForeachContext *context, int num_vertices, int num_edges, int num_loops, int num_faces, Span< int > subdiv_face_offset) ForeachTopologyInformationCb
void(*)(const ForeachContext *context, OffsetIndices< int > subdiv_faces_by_base_face) FacesCb
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 coarse_vert_index, int subdiv_vert_index) ForeachLooseCb
void(*)(const ForeachContext *context, void *tls, int coarse_edge_index, float u, int subdiv_vert_index) ForeachVertOfLooseEdgeCb
void(*)(const ForeachContext *context, void *tls, int ptex_face_index, float u, float v, int coarse_vert_index, int coarse_face_index, int coarse_corner, int subdiv_vert_index) ForeachVertFromCornerCb
void(*)(const ForeachContext *context, void *tls, int ptex_face_index, float u, float v, int coarse_face_index, int coarse_corner, int subdiv_vert_index) ForeachVertInnerCb
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_vert_index) ForeachVertFromEdgeCb
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_vert_index, int subdiv_edge_index) ForeachLoopCb
BMesh Iterators.
ATTR_WARN_UNUSED_RESULT const BMVert * v
ForeachTopologyInformationCb topology_info
ForeachVertOfLooseEdgeCb vert_of_loose_edge