Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_subdiv_foreach.h
| Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | typedef void (*SubdivForeachPolygonCb)(const struct SubdivForeachContext *context, | ||||
| const int start_loop_index, | const int start_loop_index, | ||||
| const int num_loops); | const int num_loops); | ||||
| typedef void (*SubdivForeachLooseCb)(const struct SubdivForeachContext *context, | typedef void (*SubdivForeachLooseCb)(const struct SubdivForeachContext *context, | ||||
| void *tls, | void *tls, | ||||
| const int coarse_vertex_index, | const int coarse_vertex_index, | ||||
| const int subdiv_vertex_index); | const int subdiv_vertex_index); | ||||
| /** | |||||
| * \param u_index: The index of the step along the edge (a value in `[0..resolution - 1]`). | |||||
| */ | |||||
| typedef void (*SubdivForeachVertexOfLooseEdgeCb)(const struct SubdivForeachContext *context, | typedef void (*SubdivForeachVertexOfLooseEdgeCb)(const struct SubdivForeachContext *context, | ||||
| void *tls, | void *tls, | ||||
| const int coarse_edge_index, | const int coarse_edge_index, | ||||
| const int u_index, | |||||
sergey: If you want to check for endpoints use `u == 0.0f || v == 1.0f` (similar to the corner vertex… | |||||
| const float u, | const float u, | ||||
| const int subdiv_vertex_index); | const int subdiv_vertex_index); | ||||
| typedef struct SubdivForeachContext { | typedef struct SubdivForeachContext { | ||||
| /* Is called when topology information becomes available. | /* Is called when topology information becomes available. | ||||
| * Is only called once. | * Is only called once. | ||||
| * | * | ||||
| * NOTE: If this callback returns false, the foreach loop is aborted. | * NOTE: If this callback returns false, the foreach loop is aborted. | ||||
| ▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines | |||||
If you want to check for endpoints use u == 0.0f || v == 1.0f (similar to the corner vertex check).
Keep the foreach API simple, generic, and high level.