41 #define FACE_NET _FLAG_WALK
43 #define EDGE_NET _FLAG_WALK
45 #define VERT_VISIT _FLAG_WALK
46 #define VERT_IN_QUEUE _FLAG_WALK_ALT
83 const float axis_mat[3][3],
98 const float face_normal[3],
99 const float face_normal_matrix[3][3],
112 int edges_boundary_len = 0;
113 int edges_wire_len = 0;
117 e = e_first = v_init->
e;
123 edges_boundary_len++;
125 else if (
count == 0) {
134 if (edges_boundary_len == 0) {
143 if (edges_wire_len == 0) {
144 if (edges_boundary_len > 1) {
147 if (edges_boundary_len > 2) {
158 if (edges_wire_len > 1) {
169 float dir_prev[2], dir_next[2];
173 float angle_best_cos =
dot_v2v2(dir_next, dir_prev);
181 const float angle_test_cos =
dot_v2v2(dir_prev, dir_test);
183 if (angle_test_cos > angle_best_cos) {
184 angle_best_cos = angle_test_cos;
193 if (face_normal == l_walk->
f->
no) {
196 if (l_walk->
v != v_init) {
216 int edges_boundary_len = 0;
217 int edges_wire_len = 0;
221 e = e_first = v_init->
e;
226 edges_boundary_len++;
228 else if (
count == 0) {
236 if (edges_boundary_len == 0) {
241 if (edges_wire_len == 0) {
242 if (edges_boundary_len >= 2) {
258 const float face_normal[3],
261 const uint edge_order_len,
267 #define USE_FASTPATH_NOFORK
304 #ifdef USE_FASTPATH_NOFORK
324 if (e_next != e_first) {
340 printf(
"vert %d -> %d (add=%d)\n",
357 #ifdef USE_FASTPATH_NOFORK
371 for (j = 0; j <
STACK_SIZE(edge_order); j++) {
373 v_prev->
co,
v->
co, edge_order[j].
v->
co, face_normal);
380 #ifdef USE_FASTPATH_NOFORK
404 #undef USE_FASTPATH_NOFORK
408 const float face_normal[3],
409 const float face_normal_matrix[3][3],
412 const uint edge_order_len,
414 int *r_face_verts_len)
427 v_init, face_normal, edge_order, edge_order_len, e_pair)) {
430 r_face_verts[i++] = v_init;
433 r_face_verts[i++] =
v;
435 *r_face_verts_len = i;
436 return (i > 2) ? true :
false;
444 const int edge_net_len,
460 const uint edge_order_len = edge_net_len + 2;
478 edge_order =
MEM_mallocN(
sizeof(*edge_order) * edge_order_len, __func__);
481 face_verts =
MEM_mallocN(
sizeof(*face_verts) * (edge_net_len + f->
len), __func__);
483 vert_queue =
MEM_mallocN(
sizeof(vert_queue) * (edge_net_len + f->
len), __func__);
490 for (i = 0; i < edge_net_len; i++) {
497 }
while ((l_iter = l_iter->
next) != l_first);
506 for (i = 0; i < edge_net_len; i++) {
515 }
while ((l_iter = l_iter->
next) != l_first);
517 float face_normal_matrix[3][3];
537 for (i = 0; i < edge_net_len; i++) {
564 }
while ((l_iter = l_iter->
next) != l_first);
578 float axis_mat[3][3];
600 }
while ((
void)i++, (l_iter = l_iter->
next) != l_first);
602 for (i = 0; i < edge_net_len; i++) {
614 if (l_first ==
NULL) {
633 for (i = 0; i < edge_net_len; i++) {
644 }
while ((l_iter = l_iter->
next) != l_first);
660 *r_face_arr = face_arr;
696 #define USE_PARTIAL_CONNECT
698 #define VERT_IS_VALID BM_ELEM_INTERNAL_TAG
710 const float endpoint_bias = 1e-4f;
712 v_a->
co, v_b->
co,
e->v1->
co,
e->v2->
co, endpoint_bias, r_isect) == 1) &&
713 ((
e->v1 != v_a) && (
e->v2 != v_a) && (
e->v1 != v_b) && (
e->v2 != v_b)));
718 if (pt_a[0] < pt_b[0]) {
721 if (pt_a[0] > pt_b[0]) {
724 if (pt_a[1] < pt_b[1]) {
727 if (pt_a[1] > pt_b[1]) {
800 const float dist_new =
data->dist_orig *
t;
804 if (
LIKELY((dist_new < hit->dist) && (dist_new > 0.0f))) {
806 if (v1_index < (
int)
data->vert_range[0] || v1_index >= (
int)
data->vert_range[1]) {
807 hit->
dist = dist_new;
829 if (
LIKELY(dist_new < hit->dist && (dist_new > 0.0f))) {
830 if (
e->v1 !=
data->v_origin &&
e->v2 !=
data->v_origin) {
833 if (v1_index < (
int)
data->vert_range[0] || v1_index >= (
int)
data->vert_range[1]) {
834 hit->
dist = dist_new;
899 if (t_test < t_best) {
983 const float dir[3] = {[
SORT_AXIS] = direction_sign ? 1.0f : -1.0f};
1006 for (
int j = 0; j < 2; j++) {
1007 BMVert *v_iter = v_pair[j];
1017 v_other_fallback = v_other;
1022 if (v_other ==
NULL) {
1023 printf(
"Using fallback\n");
1024 v_other = v_other_fallback;
1042 #ifdef USE_PARTIAL_CONNECT
1069 uint e_delimit_list_len = 0;
1071 # define EDGE_NOT_IN_STACK BM_ELEM_INTERNAL_TAG
1072 # define VERT_NOT_IN_STACK BM_ELEM_INTERNAL_TAG
1074 # define FOREACH_VERT_EDGE(v_, e_, body_) \
1076 BMEdge *e_ = v_->e; \
1079 } while ((e_ = BM_DISK_EDGE_NEXT(e_, v_)) != v_->e); \
1090 e_delimit_list_len++;
1092 e_face_init = e_iter;
1098 if (
LIKELY(e_delimit_list_len <= 2)) {
1139 bool is_delimit =
false;
1151 # undef FOREACH_VERT_EDGE
1176 }
while ((vert_stack = vert_stack->
next));
1180 }
while ((e_delimit_list = e_delimit_list->
next));
1182 # undef EDGE_NOT_IN_STACK
1183 # undef VERT_NOT_IN_STACK
1192 const int v_a_index,
1193 const int v_b_index)
1196 if (
UNLIKELY((remap[v_a_index] == v_b_index) || (remap[v_b_index] == v_a_index))) {
1207 const uint edge_net_init_len,
1208 bool use_partial_connect,
1210 BMEdge ***r_edge_net_new,
1211 uint *r_edge_net_new_len)
1229 uint edge_net_new_len = (
uint)edge_net_init_len;
1231 memcpy(
edge_arr, edge_net_init,
sizeof(*
edge_arr) * (
size_t)edge_net_init_len);
1234 #define EDGE_NOT_IN_STACK BM_ELEM_INTERNAL_TAG
1235 #define VERT_NOT_IN_STACK BM_ELEM_INTERNAL_TAG
1238 uint i = edge_net_init_len;
1239 BMLoop *l_iter, *l_first;
1245 }
while ((l_iter = l_iter->
next) != l_first);
1249 for (
uint i = 0; i < edge_arr_len; i++) {
1255 #ifdef USE_PARTIAL_CONNECT
1257 struct TempVertPair {
1258 struct TempVertPair *
next;
1264 struct TempVertPair *list;
1267 } temp_vert_pairs = {
NULL};
1269 if (use_partial_connect) {
1270 for (
uint i = 0; i < edge_net_init_len; i++) {
1271 for (
uint j = 0; j < 2; j++) {
1272 BMVert *v_delimit = (&edge_arr[i]->
v1)[j];
1278 tvp->next = temp_vert_pairs.list;
1279 tvp->v_orig = v_delimit;
1280 tvp->v_temp = v_other;
1281 temp_vert_pairs.list = tvp;
1282 temp_vert_pairs.len++;
1287 if (temp_vert_pairs.len == 0) {
1288 use_partial_connect =
false;
1293 uint group_arr_len = 0;
1298 uint edge_index = (edge_arr_len - 1);
1299 uint edge_in_group_tot = 0;
1305 uint unique_verts_in_group = 0, unique_edges_in_group = 0;
1314 unique_verts_in_group++;
1320 unique_edges_in_group++;
1334 g->vert_len = unique_verts_in_group;
1335 g->edge_len = unique_edges_in_group;
1336 edge_in_group_tot += unique_edges_in_group;
1342 if (edge_in_group_tot == edge_arr_len) {
1355 if (group_arr_len == 1) {
1365 float axis_mat[3][3];
1368 #define VERT_IN_ARRAY BM_ELEM_INTERNAL_TAG
1371 sizeof(*group_arr) * group_arr_len);
1372 uint vert_arr_len = 0;
1385 float min_axis[2] = {FLT_MAX, FLT_MAX};
1386 float max_axis[2] = {-FLT_MAX, -FLT_MAX};
1392 for (
int j = 0; j < 2; j++) {
1397 const float axis_value[2] = {
1408 g->vert_span.min = v_iter;
1412 g->vert_span.max = v_iter;
1421 g->has_prev_edge =
false;
1423 vert_arr_len +=
g->vert_len;
1425 *(--group_arr_p) =
g;
1435 sizeof(*verts_group_table) * vert_arr_len);
1438 sizeof(*vert_coords_backup) * vert_arr_len);
1445 for (
uint g_index = 0; g_index < group_arr_len; g_index++) {
1449 for (
int j = 0; j < 2; j++) {
1463 v_iter->
co[0] = co_2d[0];
1464 v_iter->
co[1] = co_2d[1];
1465 v_iter->
co[2] = 0.0f;
1470 vert_arr[v_index] = v_iter;
1471 verts_group_table[v_index] = g_index;
1486 for (
uint i = 0; i < edge_arr_len; i++) {
1487 const float e_cos[2][3] = {
1495 #ifdef USE_PARTIAL_CONNECT
1496 if (use_partial_connect) {
1499 sizeof(*temp_vert_pairs.remap) * vert_arr_len);
1500 copy_vn_i(temp_vert_pairs.remap, vert_arr_len, -1);
1502 struct TempVertPair *tvp = temp_vert_pairs.list;
1505 }
while ((tvp = tvp->next));
1512 edge_net_new_len = (
uint)edge_net_init_len + ((group_arr_len - 1) * 2);
1514 memcpy(edge_net_new, edge_net_init,
sizeof(*edge_net_new) * (
size_t)edge_net_init_len);
1517 uint edge_net_new_index = edge_net_init_len;
1523 vert_range[1] = group_arr[0]->
vert_len;
1533 .edge_arr_new = edge_net_new + edge_net_init_len,
1534 .edge_arr_new_len = 0,
1539 for (
uint g_index = 1; g_index < group_arr_len; g_index++) {
1543 vert_range[0] = vert_range[1];
1544 vert_range[1] +=
g->vert_len;
1546 if (
g->has_prev_edge ==
false) {
1547 BMVert *v_origin =
g->vert_span.min;
1553 if (index_other != -1) {
1554 #ifdef USE_PARTIAL_CONNECT
1555 if ((use_partial_connect ==
false) ||
1560 BMVert *v_end = vert_arr[index_other];
1563 #ifdef USE_PARTIAL_CONNECT
1566 edge_net_new_index++;
1573 BMVert *v_origin =
g->vert_span.max;
1579 if (index_other != -1) {
1580 #ifdef USE_PARTIAL_CONNECT
1581 if ((use_partial_connect ==
false) ||
1586 BMVert *v_end = vert_arr[index_other];
1588 #ifdef USE_PARTIAL_CONNECT
1591 edge_net_new_index++;
1596 uint g_index_other = verts_group_table[index_other];
1601 BLI_assert(edge_net_new_len >= edge_net_new_index);
1602 edge_net_new_len = edge_net_new_index;
1607 *r_edge_net_new = edge_net_new;
1608 *r_edge_net_new_len = edge_net_new_len;
1611 for (
uint i = 0; i < vert_arr_len; i++) {
1612 copy_v3_v3(vert_arr[i]->co, vert_coords_backup[i]);
1617 #ifdef USE_PARTIAL_CONNECT
1619 if (use_partial_connect) {
1624 struct TempVertPair *tvp = temp_vert_pairs.list;
1629 }
while ((tvp = tvp->next));
1633 struct TempVertPair *tvp = temp_vert_pairs.list;
1640 }
while ((tvp = tvp->next));
1644 for (
uint i = edge_net_init_len; i < edge_net_new_len; i++) {
1648 if (i == edge_net_new_len) {
1651 edge_net_new[i] = edge_net_new[edge_net_new_len];
1655 *r_edge_net_new_len = edge_net_new_len;
1659 for (
uint i = 0; i < edge_arr_len; i++) {
1665 #undef VERT_IN_ARRAY
1666 #undef VERT_NOT_IN_STACK
1667 #undef EDGE_NOT_IN_STACK
typedef float(TangentPoint)[2]
CustomData interface, see also DNA_customdata_types.h.
bool CustomData_has_math(const struct CustomData *data)
void CustomData_bmesh_copy_data(const struct CustomData *source, struct CustomData *dest, void *src_block, void **dest_block)
void CustomData_bmesh_interp(struct CustomData *data, const void **src_blocks, const float *weights, const float *sub_weights, int count, void *dst_block)
#define BLI_array_alloca(arr, realsize)
A (mainly) macro array library.
#define BLI_array_append(arr, item)
#define BLI_array_declare(arr)
#define BLI_array_len(arr)
MINLINE axis_t min_axis(axis_t a, axis_t b)
#define BVH_RAYCAST_DIST_MAX
void BLI_bvhtree_balance(BVHTree *tree)
BVHTree * BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis)
int BLI_bvhtree_ray_cast_ex(BVHTree *tree, const float co[3], const float dir[3], float radius, BVHTreeRayHit *hit, BVHTree_RayCastCallback callback, void *userdata, int flag)
void BLI_bvhtree_free(BVHTree *tree)
void BLI_bvhtree_insert(BVHTree *tree, int index, const float co[3], int numpoints)
void BLI_linklist_prepend_nlink(LinkNode **listp, void *ptr, LinkNode *nlink) ATTR_NONNULL(1
void BLI_linklist_prepend_arena(LinkNode **listp, void *ptr, struct MemArena *ma) ATTR_NONNULL(1
#define BLI_linklist_prepend_alloca(listp, ptr)
BLI_LINKSTACK_*** wrapper macros for using a LinkNode to store a stack of pointers,...
#define BLI_SMALLSTACK_DECLARE(var, type)
#define BLI_SMALLSTACK_POP(var)
#define BLI_SMALLSTACK_PUSH(var, data)
#define BLI_SMALLSTACK_POP_EX(var_src, var_dst)
#define BLI_SMALLSTACK_IS_EMPTY(var)
#define BLI_SMALLSTACK_SWAP(var_a, var_b)
#define BLI_ASSERT_UNIT_V2(v)
bool isect_ray_seg_v2(const float ray_origin[2], const float ray_direction[2], const float v0[2], const float v1[2], float *r_lambda, float *r_u)
float line_point_factor_v2(const float p[2], const float l1[2], const float l2[2])
void axis_dominant_v3_to_m3(float r_mat[3][3], const float normal[3])
Normal to x,y matrix.
void interp_weights_poly_v2(float w[], float v[][2], int n, const float co[2])
int isect_seg_seg_v2_point_ex(const float v0[2], const float v1[2], const float v2[2], const float v3[2], float endpoint_bias, float vi[2])
void mul_v2_m3v3(float r[2], const float M[3][3], const float a[3])
MINLINE float len_squared_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v3_v3(float r[3], const float a[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE float dot_m3_v3_row_x(const float M[3][3], const float a[3]) ATTR_WARN_UNUSED_RESULT
float angle_signed_on_axis_v3v3v3_v3(const float v1[3], const float v2[3], const float v3[3], const float axis[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE float dot_m3_v3_row_y(const float M[3][3], const float a[3]) ATTR_WARN_UNUSED_RESULT
void copy_vn_i(int *array_tar, int size, int val)
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE float dot_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE float normalize_v2(float r[2])
void * BLI_memarena_alloc(struct MemArena *ma, size_t size) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_ALLOC_SIZE(2)
int BLI_sortutil_cmp_float_reverse(const void *a_, const void *b_)
#define ARRAY_SET_ITEMS(...)
#define STACK_POP_PTR(stack)
#define STACK_PUSH(stack, val)
#define STACK_DECLARE(stack)
#define STACK_SIZE(stack)
#define STACK_PUSH_RET_PTR(stack)
#define STACK_INIT(stack, stack_num)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
Read Guarded memory(de)allocation.
#define BM_DISK_EDGE_NEXT(e, v)
#define BM_FACE_FIRST_LOOP(p)
void bmesh_face_swap_data(BMFace *f_a, BMFace *f_b)
BMVert * BM_vert_create(BMesh *bm, const float co[3], const BMVert *v_example, const eBMCreateFlag create_flag)
Main function for creating a new vertex.
BMFace * BM_face_create_verts(BMesh *bm, BMVert **vert_arr, const int len, const BMFace *f_example, const eBMCreateFlag create_flag, const bool create_edges)
bool BM_vert_splice(BMesh *bm, BMVert *v_dst, BMVert *v_src)
Splice Vert.
void BM_vert_kill(BMesh *bm, BMVert *v)
void BM_face_kill(BMesh *bm, BMFace *f)
void BM_vert_separate_tested_edges(BMesh *UNUSED(bm), BMVert *v_dst, BMVert *v_src, bool(*testfn)(BMEdge *, void *arg), void *arg)
void BM_edge_kill(BMesh *bm, BMEdge *e)
BMEdge * BM_edge_create(BMesh *bm, BMVert *v1, BMVert *v2, const BMEdge *e_example, const eBMCreateFlag create_flag)
Main function for creating a new edge.
#define BM_elem_index_get(ele)
#define BM_elem_flag_disable(ele, hflag)
#define BM_elem_index_set(ele, index)
#define BM_elem_flag_test(ele, hflag)
#define BM_elem_flag_enable(ele, hflag)
#define BM_ITER_ELEM(ele, iter, data, itype)
ATTR_WARN_UNUSED_RESULT BMesh * bm
static bool bm_face_split_edgenet_find_loop_pair(BMVert *v_init, const float face_normal[3], const float face_normal_matrix[3][3], BMEdge *e_pair[2])
static void bvhtree_test_edges_isect_2d_vert_cb(void *user_data, int index, const BVHTreeRay *UNUSED(ray), BVHTreeRayHit *hit)
static BMLoop * bm_edge_flagged_radial_first(BMEdge *e)
static BMEdge * test_edges_isect_2d_vert(const struct EdgeGroup_FindConnection_Args *args, BMVert *v_origin, BMVert *v_other)
static bool bm_face_split_edgenet_find_loop(BMVert *v_init, const float face_normal[3], const float face_normal_matrix[3][3], struct VertOrder *edge_order, const uint edge_order_len, BMVert **r_face_verts, int *r_face_verts_len)
static bool bm_face_split_edgenet_find_loop_walk(BMVert *v_init, const float face_normal[3], struct VertOrder *edge_order, const uint edge_order_len, BMEdge *e_pair[2])
static bool bm_vert_partial_connect_check_overlap(const int *remap, const int v_a_index, const int v_b_index)
#define VERT_NOT_IN_STACK
static BMEdge * test_edges_isect_2d_ray(const struct EdgeGroup_FindConnection_Args *args, BMVert *v_origin, const float dir[3])
bool BM_face_split_edgenet_connect_islands(BMesh *bm, BMFace *f, BMEdge **edge_net_init, const uint edge_net_init_len, bool use_partial_connect, MemArena *mem_arena, BMEdge ***r_edge_net_new, uint *r_edge_net_new_len)
static void bvhtree_test_edges_isect_2d_ray_cb(void *user_data, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit)
static BMVert * bm_face_split_edgenet_partial_connect(BMesh *bm, BMVert *v_delimit, BMFace *f)
static int bm_face_split_edgenet_find_connection(const struct EdgeGroup_FindConnection_Args *args, BMVert *v_origin, bool direction_sign)
#define EDGE_NOT_IN_STACK
#define FOREACH_VERT_EDGE(v_, e_, body_)
bool BM_face_split_edgenet(BMesh *bm, BMFace *f, BMEdge **edge_net, const int edge_net_len, BMFace ***r_face_arr, int *r_face_arr_len)
static void normalize_v2_m3_v3v3(float out[2], const float axis_mat[3][3], const float v1[3], const float v2[3])
static bool bm_face_split_edgenet_find_loop_pair_exists(BMVert *v_init)
static bool test_tagged_and_notface(BMEdge *e, void *fptr)
BLI_INLINE bool edge_isect_verts_point_2d(const BMEdge *e, const BMVert *v_a, const BMVert *v_b, float r_isect[2])
static uint bm_edge_flagged_radial_count(BMEdge *e)
static int group_min_cmp_fn(const void *p1, const void *p2)
BLI_INLINE int axis_pt_cmp(const float pt_a[2], const float pt_b[2])
#define BM_ELEM_API_FLAG_DISABLE(element, f)
#define BM_ELEM_API_FLAG_TEST(element, f)
#define BM_ELEM_API_FLAG_ENABLE(element, f)
BMEdge * BM_edge_exists(BMVert *v_a, BMVert *v_b)
BMEdge * BM_edge_find_double(BMEdge *e)
bool BM_edge_in_face(const BMEdge *e, const BMFace *f)
BLI_INLINE BMVert * BM_edge_other_vert(BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
static MemArena * mem_arena
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
static const pxr::TfToken g("g", pxr::TfToken::Immortal)
struct BMLoop * radial_next
struct EdgeGroupIsland::@162 vert_span