55 #define FACE_NET _FLAG_WALK
57 #define EDGE_NET _FLAG_WALK
59 #define VERT_VISIT _FLAG_WALK
60 #define VERT_IN_QUEUE _FLAG_WALK_ALT
97 const float axis_mat[3][3],
112 const float face_normal[3],
113 const float face_normal_matrix[3][3],
126 int edges_boundary_len = 0;
127 int edges_wire_len = 0;
131 e = e_first = v_init->
e;
137 edges_boundary_len++;
139 else if (
count == 0) {
148 if (edges_boundary_len == 0) {
157 if (edges_wire_len == 0) {
158 if (edges_boundary_len > 1) {
161 if (edges_boundary_len > 2) {
172 if (edges_wire_len > 1) {
183 float dir_prev[2], dir_next[2];
187 float angle_best_cos =
dot_v2v2(dir_next, dir_prev);
195 const float angle_test_cos =
dot_v2v2(dir_prev, dir_test);
197 if (angle_test_cos > angle_best_cos) {
198 angle_best_cos = angle_test_cos;
207 if (face_normal == l_walk->
f->
no) {
210 if (l_walk->
v != v_init) {
230 int edges_boundary_len = 0;
231 int edges_wire_len = 0;
235 e = e_first = v_init->
e;
240 edges_boundary_len++;
242 else if (
count == 0) {
250 if (edges_boundary_len == 0) {
255 if (edges_wire_len == 0) {
256 if (edges_boundary_len >= 2) {
272 const float face_normal[3],
275 const uint edge_order_len,
281 #define USE_FASTPATH_NOFORK
318 #ifdef USE_FASTPATH_NOFORK
338 if (e_next != e_first) {
354 printf(
"vert %d -> %d (add=%d)\n",
371 #ifdef USE_FASTPATH_NOFORK
385 for (j = 0; j <
STACK_SIZE(edge_order); j++) {
387 v_prev->
co,
v->
co, edge_order[j].
v->
co, face_normal);
394 #ifdef USE_FASTPATH_NOFORK
418 #undef USE_FASTPATH_NOFORK
422 const float face_normal[3],
423 const float face_normal_matrix[3][3],
426 const uint edge_order_len,
428 int *r_face_verts_len)
441 v_init, face_normal, edge_order, edge_order_len, e_pair)) {
444 r_face_verts[i++] = v_init;
447 r_face_verts[i++] =
v;
449 *r_face_verts_len = i;
450 return (i > 2) ? true :
false;
466 const int edge_net_len,
482 const uint edge_order_len = edge_net_len + 2;
500 edge_order =
MEM_mallocN(
sizeof(*edge_order) * edge_order_len, __func__);
503 face_verts =
MEM_mallocN(
sizeof(*face_verts) * (edge_net_len + f->
len), __func__);
505 vert_queue =
MEM_mallocN(
sizeof(vert_queue) * (edge_net_len + f->
len), __func__);
512 for (i = 0; i < edge_net_len; i++) {
519 }
while ((l_iter = l_iter->
next) != l_first);
528 for (i = 0; i < edge_net_len; i++) {
537 }
while ((l_iter = l_iter->
next) != l_first);
539 float face_normal_matrix[3][3];
559 for (i = 0; i < edge_net_len; i++) {
586 }
while ((l_iter = l_iter->
next) != l_first);
600 float axis_mat[3][3];
622 }
while ((
void)i++, (l_iter = l_iter->
next) != l_first);
624 for (i = 0; i < edge_net_len; i++) {
636 if (l_first ==
NULL) {
655 for (i = 0; i < edge_net_len; i++) {
666 }
while ((l_iter = l_iter->
next) != l_first);
682 *r_face_arr = face_arr;
718 #define USE_PARTIAL_CONNECT
720 #define VERT_IS_VALID BM_ELEM_INTERNAL_TAG
732 const float endpoint_bias = 1e-4f;
734 v_a->
co, v_b->
co,
e->v1->
co,
e->v2->
co, endpoint_bias, r_isect) == 1) &&
735 ((
e->v1 != v_a) && (
e->v2 != v_a) && (
e->v1 != v_b) && (
e->v2 != v_b)));
740 if (pt_a[0] < pt_b[0]) {
743 if (pt_a[0] > pt_b[0]) {
746 if (pt_a[1] < pt_b[1]) {
749 if (pt_a[1] > pt_b[1]) {
822 const float dist_new =
data->dist_orig *
t;
826 if (
LIKELY((dist_new < hit->dist) && (dist_new > 0.0f))) {
828 if (v1_index < (
int)
data->vert_range[0] || v1_index >= (
int)
data->vert_range[1]) {
829 hit->
dist = dist_new;
851 if (
LIKELY(dist_new < hit->dist && (dist_new > 0.0f))) {
852 if (
e->v1 !=
data->v_origin &&
e->v2 !=
data->v_origin) {
855 if (v1_index < (
int)
data->vert_range[0] || v1_index >= (
int)
data->vert_range[1]) {
856 hit->
dist = dist_new;
921 if (t_test < t_best) {
1005 const float dir[3] = {[
SORT_AXIS] = direction_sign ? 1.0f : -1.0f};
1028 for (
int j = 0; j < 2; j++) {
1029 BMVert *v_iter = v_pair[j];
1039 v_other_fallback = v_other;
1044 if (v_other ==
NULL) {
1045 printf(
"Using fallback\n");
1046 v_other = v_other_fallback;
1064 #ifdef USE_PARTIAL_CONNECT
1091 uint e_delimit_list_len = 0;
1093 # define EDGE_NOT_IN_STACK BM_ELEM_INTERNAL_TAG
1094 # define VERT_NOT_IN_STACK BM_ELEM_INTERNAL_TAG
1096 # define FOREACH_VERT_EDGE(v_, e_, body_) \
1098 BMEdge *e_ = v_->e; \
1101 } while ((e_ = BM_DISK_EDGE_NEXT(e_, v_)) != v_->e); \
1112 e_delimit_list_len++;
1114 e_face_init = e_iter;
1120 if (
LIKELY(e_delimit_list_len <= 2)) {
1158 bool is_delimit =
false;
1170 # undef FOREACH_VERT_EDGE
1195 }
while ((vert_stack = vert_stack->
next));
1199 }
while ((e_delimit_list = e_delimit_list->
next));
1201 # undef EDGE_NOT_IN_STACK
1202 # undef VERT_NOT_IN_STACK
1211 const int v_a_index,
1212 const int v_b_index)
1215 if (
UNLIKELY((remap[v_a_index] == v_b_index) || (remap[v_b_index] == v_a_index))) {
1234 const uint edge_net_init_len,
1235 bool use_partial_connect,
1237 BMEdge ***r_edge_net_new,
1238 uint *r_edge_net_new_len)
1256 uint edge_net_new_len = (
uint)edge_net_init_len;
1258 memcpy(
edge_arr, edge_net_init,
sizeof(*
edge_arr) * (
size_t)edge_net_init_len);
1261 #define EDGE_NOT_IN_STACK BM_ELEM_INTERNAL_TAG
1262 #define VERT_NOT_IN_STACK BM_ELEM_INTERNAL_TAG
1265 uint i = edge_net_init_len;
1266 BMLoop *l_iter, *l_first;
1272 }
while ((l_iter = l_iter->
next) != l_first);
1276 for (
uint i = 0; i < edge_arr_len; i++) {
1282 #ifdef USE_PARTIAL_CONNECT
1284 struct TempVertPair {
1285 struct TempVertPair *
next;
1291 struct TempVertPair *list;
1294 } temp_vert_pairs = {
NULL};
1296 if (use_partial_connect) {
1297 for (
uint i = 0; i < edge_net_init_len; i++) {
1298 for (
uint j = 0; j < 2; j++) {
1299 BMVert *v_delimit = (&edge_arr[i]->
v1)[j];
1305 tvp->next = temp_vert_pairs.list;
1306 tvp->v_orig = v_delimit;
1307 tvp->v_temp = v_other;
1308 temp_vert_pairs.list = tvp;
1309 temp_vert_pairs.len++;
1314 if (temp_vert_pairs.len == 0) {
1315 use_partial_connect =
false;
1320 uint group_arr_len = 0;
1325 uint edge_index = (edge_arr_len - 1);
1326 uint edge_in_group_tot = 0;
1332 uint unique_verts_in_group = 0, unique_edges_in_group = 0;
1341 unique_verts_in_group++;
1347 unique_edges_in_group++;
1361 g->
vert_len = unique_verts_in_group;
1362 g->
edge_len = unique_edges_in_group;
1363 edge_in_group_tot += unique_edges_in_group;
1369 if (edge_in_group_tot == edge_arr_len) {
1382 if (group_arr_len == 1) {
1392 float axis_mat[3][3];
1395 #define VERT_IN_ARRAY BM_ELEM_INTERNAL_TAG
1398 sizeof(*group_arr) * group_arr_len);
1399 uint vert_arr_len = 0;
1412 float min_axis[2] = {FLT_MAX, FLT_MAX};
1413 float max_axis[2] = {-FLT_MAX, -FLT_MAX};
1419 for (
int j = 0; j < 2; j++) {
1424 const float axis_value[2] = {
1435 g->vert_span.min = v_iter;
1439 g->vert_span.max = v_iter;
1448 g->has_prev_edge =
false;
1450 vert_arr_len += g->vert_len;
1452 *(--group_arr_p) = g;
1462 sizeof(*verts_group_table) * vert_arr_len);
1465 sizeof(*vert_coords_backup) * vert_arr_len);
1472 for (
uint g_index = 0; g_index < group_arr_len; g_index++) {
1476 for (
int j = 0; j < 2; j++) {
1490 v_iter->
co[0] = co_2d[0];
1491 v_iter->
co[1] = co_2d[1];
1492 v_iter->
co[2] = 0.0f;
1497 vert_arr[v_index] = v_iter;
1498 verts_group_table[v_index] = g_index;
1513 for (
uint i = 0; i < edge_arr_len; i++) {
1514 const float e_cos[2][3] = {
1522 #ifdef USE_PARTIAL_CONNECT
1523 if (use_partial_connect) {
1526 sizeof(*temp_vert_pairs.remap) * vert_arr_len);
1527 copy_vn_i(temp_vert_pairs.remap, vert_arr_len, -1);
1529 struct TempVertPair *tvp = temp_vert_pairs.list;
1532 }
while ((tvp = tvp->next));
1539 edge_net_new_len = (
uint)edge_net_init_len + ((group_arr_len - 1) * 2);
1541 memcpy(edge_net_new, edge_net_init,
sizeof(*edge_net_new) * (
size_t)edge_net_init_len);
1544 uint edge_net_new_index = edge_net_init_len;
1550 vert_range[1] = group_arr[0]->
vert_len;
1560 .edge_arr_new = edge_net_new + edge_net_init_len,
1561 .edge_arr_new_len = 0,
1566 for (
uint g_index = 1; g_index < group_arr_len; g_index++) {
1570 vert_range[0] = vert_range[1];
1580 if (index_other != -1) {
1581 #ifdef USE_PARTIAL_CONNECT
1582 if ((use_partial_connect ==
false) ||
1587 BMVert *v_end = vert_arr[index_other];
1590 #ifdef USE_PARTIAL_CONNECT
1593 edge_net_new_index++;
1606 if (index_other != -1) {
1607 #ifdef USE_PARTIAL_CONNECT
1608 if ((use_partial_connect ==
false) ||
1613 BMVert *v_end = vert_arr[index_other];
1615 #ifdef USE_PARTIAL_CONNECT
1618 edge_net_new_index++;
1623 uint g_index_other = verts_group_table[index_other];
1628 BLI_assert(edge_net_new_len >= edge_net_new_index);
1629 edge_net_new_len = edge_net_new_index;
1634 *r_edge_net_new = edge_net_new;
1635 *r_edge_net_new_len = edge_net_new_len;
1638 for (
uint i = 0; i < vert_arr_len; i++) {
1639 copy_v3_v3(vert_arr[i]->co, vert_coords_backup[i]);
1644 #ifdef USE_PARTIAL_CONNECT
1646 if (use_partial_connect) {
1651 struct TempVertPair *tvp = temp_vert_pairs.list;
1656 }
while ((tvp = tvp->next));
1660 struct TempVertPair *tvp = temp_vert_pairs.list;
1667 }
while ((tvp = tvp->next));
1671 for (
uint i = edge_net_init_len; i < edge_net_new_len; i++) {
1675 if (i == edge_net_new_len) {
1678 edge_net_new[i] = edge_net_new[edge_net_new_len];
1682 *r_edge_net_new_len = edge_net_new_len;
1686 for (
uint i = 0; i < edge_arr_len; i++) {
1692 #undef VERT_IN_ARRAY
1693 #undef VERT_NOT_IN_STACK
1694 #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], const 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], const 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
void copy_vn_i(int *array_tar, const int size, const int val)
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
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_INIT(stack, tot)
#define STACK_SIZE(stack)
#define STACK_PUSH_RET_PTR(stack)
_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)
struct BMLoop * radial_next
struct EdgeGroupIsland::@156 vert_span