58 #define USE_NET_ISLAND_CONNECT
141 ls_base = *ls_base_p;
171 for (i = 0,
node = v_ls_base->
list; i < v_ls_base->list_len; i++,
node =
node->next) {
180 for (i = 0,
node = v_ls_base->
list; i < v_ls_base->list_len; i++,
node =
node->next) {
181 node->link = vert_sort[i].
v;
207 bool use_island_connect,
208 bool use_partial_connect,
217 for (i = 0,
node = e_ls_base->
list; i < e_ls_base->list_len; i++,
node =
node->next) {
218 edge_arr[i] =
node->link;
226 # ifdef USE_NET_ISLAND_CONNECT
227 if (use_island_connect) {
228 uint edge_arr_holes_len;
237 &edge_arr_holes_len)) {
238 edge_arr_len = edge_arr_holes_len;
239 edge_arr = edge_arr_holes;
243 UNUSED_VARS(use_island_connect, mem_arena_edgenet);
264 const float *t_cos[3],
265 const float t_nor[3],
276 for (i_t0 = 0; i_t0 < 3; i_t0++) {
277 const uint i_t1 = (i_t0 + 1) % 3;
290 p0, p1, t_cos[i_t0], t_cos[i_t1], ix_pair[0], ix_pair[1], 0.0f);
292 if (ix_pair_type != 0) {
293 if (ix_pair_type == 1) {
297 if ((ix_pair_type == 1) ||
300 if ((fac >=
e->eps_margin) && (fac <= 1.0f - e->eps_margin)) {
302 if ((fac >=
e->eps_margin) && (fac <= 1.0f - e->eps_margin)) {
315 p0, p1, t_cos[0], t_cos[1], t_cos[2], &fac,
NULL, 0.0f)) {
316 if ((fac >=
e->eps_margin) && (fac <= 1.0f - e->eps_margin)) {
336 const float *t_cos[3],
337 const float t_nor[3],
359 #define KEY_SET(k, i0, i1, i2, i3) \
369 #define KEY_EDGE_TRI_ORDER(k) \
372 SWAP(int, k[2], k[3]); \
375 SWAP(int, k[0], k[2]); \
376 SWAP(int, k[1], k[3]); \
395 #undef KEY_EDGE_TRI_ORDER
404 printf(
"# cache hit (%d, %d, %d, %d)\n",
UNPACK4(k_arr[i]));
416 printf(
"# new vertex (%.6f, %.6f, %.6f) %d\n",
UNPACK3(ix), *r_side);
451 memcpy(k, k_arr[*r_side],
sizeof(
int[4]));
477 const int face_side =
data->test_fn(
l->
f,
data->user_data);
479 const int face_side_other =
data->test_fn(l_iter->
f,
data->user_data);
480 if (
UNLIKELY(face_side_other == -1)) {
483 else if (face_side_other != face_side) {
502 const float *f_a_cos[3] = {
UNPACK3_EX(, fv_a, ->co)};
503 const float *f_b_cos[3] = {
UNPACK3_EX(, fv_b, ->co)};
529 #define VERT_VISIT_A _FLAG_WALK
530 #define VERT_VISIT_B _FLAG_WALK_ALT
532 #define STACK_PUSH_TEST_A(ele) \
533 if (BM_ELEM_API_FLAG_TEST(ele, VERT_VISIT_A) == 0) { \
534 BM_ELEM_API_FLAG_ENABLE(ele, VERT_VISIT_A); \
535 STACK_PUSH(iv_ls_a, ele); \
539 #define STACK_PUSH_TEST_B(ele) \
540 if (BM_ELEM_API_FLAG_TEST(ele, VERT_VISIT_B) == 0) { \
541 BM_ELEM_API_FLAG_ENABLE(ele, VERT_VISIT_B); \
542 STACK_PUSH(iv_ls_b, ele); \
553 for (i_a = 0; i_a < 3; i_a++) {
555 for (i_b = 0; i_b < 3; i_b++) {
576 for (i_a = 0; i_a < 3; i_a++) {
579 for (i_b_e0 = 0; i_b_e0 < 3; i_b_e0++) {
580 uint i_b_e1 = (i_b_e0 + 1) % 3;
588 fv_a[i_a]->co, fv_b[i_b_e0]->co, fv_b[i_b_e1]->co);
598 printf(
" ('VERT-EDGE-A', %d, %d),\n",
618 for (i_b = 0; i_b < 3; i_b++) {
621 for (i_a_e0 = 0; i_a_e0 < 3; i_a_e0++) {
622 uint i_a_e1 = (i_a_e0 + 1) % 3;
630 fv_b[i_b]->co, fv_a[i_a_e0]->co, fv_a[i_a_e1]->co);
640 printf(
" ('VERT-EDGE-B', %d, %d),\n",
671 for (i_a = 0; i_a < 3; i_a++) {
682 printf(
" 'VERT TRI-A',\n");
698 for (i_b = 0; i_b < 3; i_b++) {
709 printf(
" 'VERT TRI-B',\n");
718 printf(
"# OVERLAP\n");
729 for (
uint i_a_e0 = 0; i_a_e0 < 3; i_a_e0++) {
730 uint i_a_e1 = (i_a_e0 + 1) % 3;
740 s, fv_a[i_a_e0], fv_a[i_a_e1], fv_b, b_index, f_b_cos, f_b_nor, &side);
745 printf(
" ('EDGE-TRI-A', %d),\n", side);
750 for (
uint i_b_e0 = 0; i_b_e0 < 3; i_b_e0++) {
751 uint i_b_e1 = (i_b_e0 + 1) % 3;
761 s, fv_b[i_b_e0], fv_b[i_b_e1], fv_a, a_index, f_a_cos, f_a_nor, &side);
766 printf(
" ('EDGE-TRI-B', %d),\n", side);
773 for (i = 0; i < 2; i++) {
836 # ifdef USE_KDOPBVH_WATERTIGHT
837 static const struct IsectRayPrecalc isect_precalc_x = {1, 2, 0, 0, 0, 1};
847 const float *v0 =
looptris[index * 3 + 0];
861 printf(
"%s:\n", __func__);
864 printf(
" dist %f\n", dist);
871 printf(
"%s: Adding depth %f\n", __func__, dist);
887 const float dir[3] = {1.0f, 0.0f, 0.0f};
899 printf(
"%s: Total intersections: %zu\n", __func__,
z_buffer.
count);
912 const float eps = FLT_EPSILON * 10;
918 float depth_last = depth_arr[0];
921 if (depth_arr[i] - depth_last >
eps) {
922 depth_last = depth_arr[i];
938 const int looptris_tot,
942 const bool use_separate,
943 const bool use_dissolve,
944 const bool use_island_connect,
945 const bool use_partial_connect,
946 const bool use_edge_tag,
947 const int boolean_mode,
954 bool has_edit_isect =
false, has_edit_boolean =
false;
957 const float **looptri_coords =
NULL;
961 uint tree_overlap_tot;
1013 printf(
"data = [\n");
1021 cos =
MEM_mallocN((
size_t)looptris_tot *
sizeof(*looptri_coords) * 3, __func__);
1022 for (i = 0, j = 0; i < looptris_tot; i++) {
1023 cos[j++] = looptris[i][0]->v->co;
1024 cos[j++] = looptris[i][1]->v->co;
1025 cos[j++] = looptris[i][2]->v->co;
1027 looptri_coords = (
const float **)
cos;
1034 for (i = 0; i < looptris_tot; i++) {
1035 if (test_fn(looptris[i][0]->f,
user_data) == 0) {
1036 const float t_cos[3][3] = {
1048 if (use_self ==
false) {
1051 for (i = 0; i < looptris_tot; i++) {
1052 if (test_fn(looptris[i][0]->f,
user_data) == 1) {
1053 const float t_cos[3][3] = {
1078 if (looptris_tot < 1024) {
1087 for (i = 0; i < tree_overlap_tot; i++) {
1089 printf(
" ((%d, %d), (\n", overlap[i].indexA, overlap[i].indexB);
1094 looptris[overlap[i].indexA],
1095 looptris[overlap[i].indexB],
1096 isect_tri_tri_no_shared);
1107 if (tree_a != tree_b) {
1114 for (i_a = 0; i_a < looptris_tot; i_a++) {
1115 const int t_a = test_fn(looptris[i_a][0]->f,
user_data);
1116 for (i_b = i_a + 1; i_b < looptris_tot; i_b++) {
1117 const int t_b = test_fn(looptris[i_b][0]->f,
user_data);
1120 if ((t_a != 0) || (t_b != 0)) {
1125 if ((t_a != t_b) && !
ELEM(-1, t_a, t_b)) {
1131 printf(
" ((%d, %d), (", i_a, i_b);
1133 bm_isect_tri_tri(&s, i_a, i_b, looptris[i_a], looptris[i_b], isect_tri_tri_no_shared);
1177 # ifdef USE_PARANOID
1272 splice_pair[1] = v_b;
1274 printf(
"# Simple Case!\n");
1278 # ifdef USE_PARANOID
1288 # ifdef USE_PARANOID
1295 # ifdef USE_PARANOID
1312 # ifdef USE_PARANOID
1317 splice_pair[1] = v_next;
1325 # ifdef USE_PARANOID
1329 printf(
"# walk step %p %p\n", e_next, v_next);
1332 # ifdef USE_PARANOID
1347 node_prev_p = &e_ls_base->
list;
1352 *node_prev_p =
node->next;
1356 node_prev_p = &
node->next;
1411 for (i = 0; i <
STACK_SIZE(splice_ls); i++) {
1444 BLI_assert(f_index >= 0 && f_index < totface_orig);
1454 bm, f, e_ls_base, use_island_connect, use_partial_connect, mem_arena_edgenet);
1494 BVHTree *tree_pair[2] = {tree_a, tree_b};
1498 int(*group_index)[2];
1517 printf(
"%s: Total face-groups: %d\n", __func__, group_tot);
1521 for (i = 0; i < group_tot; i++) {
1522 int fg = group_index[i][0];
1523 int fg_end = group_index[i][1] + fg;
1524 bool do_remove, do_flip;
1528 BMFace *f = ftable[groups_array[fg]];
1544 switch (boolean_mode) {
1546 do_remove = ((hits & 1) != 1);
1550 do_remove = ((hits & 1) == 1);
1554 do_remove = ((hits & 1) == 1) == side;
1555 do_flip = (side == 0);
1561 for (; fg != fg_end; fg++) {
1564 ftable[groups_array[fg]]->
mat_nr = -1;
1568 for (; fg != fg_end; fg++) {
1573 has_edit_boolean |= (do_flip || do_remove);
1595 if (l_iter->
f->
len == 3) {
1612 for (i = 0; i < tot; i++) {
1613 if (ftable[i]->mat_nr == -1) {
1625 if (tree_a != tree_b) {
1645 return (has_edit_isect || has_edit_boolean);
#define BLI_array_alloca(arr, realsize)
#define BLI_buffer_append(buffer_, type_, val_)
#define BLI_buffer_declare_static(type_, name_, flag_, static_count_)
#define BLI_buffer_free(name_)
BLI_INLINE void * BLI_ghashIterator_getKey(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
bool BLI_gset_haskey(const GSet *gs, const void *key) ATTR_WARN_UNUSED_RESULT
#define BLI_ghashutil_inthash_v4_cmp
BLI_INLINE void * BLI_ghashIterator_getValue(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
#define GHASH_ITER(gh_iter_, ghash_)
GSet * BLI_gset_ptr_new(const char *info)
GHash * BLI_ghash_new(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
unsigned int BLI_gset_len(const GSet *gs) ATTR_WARN_UNUSED_RESULT
void BLI_gset_insert(GSet *gs, void *key)
GHash * BLI_ghash_int_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void * BLI_ghash_lookup(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
unsigned int BLI_ghash_len(const GHash *gh) ATTR_WARN_UNUSED_RESULT
#define GSET_ITER(gs_iter_, gset_)
#define BLI_ghashutil_inthash_v4_p
void BLI_ghash_insert(GHash *gh, void *key, void *val)
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
GHash * BLI_ghash_ptr_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
BLI_INLINE void * BLI_gsetIterator_getKey(GSetIterator *gsi)
bool BLI_ghash_ensure_p(GHash *gh, void *key, void ***r_val) ATTR_WARN_UNUSED_RESULT
bool BLI_gset_add(GSet *gs, void *key)
bool BLI_gset_remove(GSet *gs, const void *key, GSetKeyFreeFP keyfreefp)
@ BVH_OVERLAP_USE_THREADING
@ BVH_OVERLAP_RETURN_PAIRS
#define BVH_RAYCAST_DIST_MAX
#define USE_KDOPBVH_WATERTIGHT
void BLI_bvhtree_balance(BVHTree *tree)
BVHTree * BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis)
BVHTreeOverlap * BLI_bvhtree_overlap_ex(const BVHTree *tree1, const BVHTree *tree2, uint *r_overlap_num, BVHTree_OverlapCallback callback, void *userdata, uint max_interactions, int flag)
void BLI_bvhtree_free(BVHTree *tree)
void BLI_bvhtree_insert(BVHTree *tree, int index, const float co[3], int numpoints)
int BLI_bvhtree_ray_cast(BVHTree *tree, const float co[3], const float dir[3], float radius, BVHTreeRayHit *hit, BVHTree_RayCastCallback callback, void *userdata)
void BLI_linklist_prepend_arena(LinkNode **listp, void *ptr, struct MemArena *ma) ATTR_NONNULL(1
int BLI_linklist_index(const LinkNode *list, void *ptr) ATTR_WARN_UNUSED_RESULT
BLI_LINKSTACK_*** wrapper macros for using a LinkNode to store a stack of pointers,...
MINLINE float clamp_f(float value, float min, float max)
MINLINE float min_fff(float a, float b, float c)
int isect_line_line_epsilon_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3], float i1[3], float i2[3], float epsilon)
bool isect_line_segment_tri_epsilon_v3(const float p1[3], const float p2[3], const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2], float epsilon)
bool isect_point_tri_v3(const float p[3], const float v1[3], const float v2[3], const float v3[3], float r_isect_co[3])
bool isect_ray_tri_watertight_v3(const float ray_origin[3], const struct IsectRayPrecalc *isect_precalc, const float v0[3], const float v1[3], const float v2[3], float *r_dist, float r_uv[2])
float line_point_factor_v3(const float p[3], const float l1[3], const float l2[3])
float normal_tri_v3(float n[3], const float v1[3], const float v2[3], const float v3[3])
bool isect_ray_tri_epsilon_v3(const float ray_origin[3], const float ray_direction[3], const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2], float epsilon)
void print_v3(const char *str, const float v[3])
MINLINE float normalize_v3(float r[3])
MINLINE float len_squared_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], float t)
void mid_v3_v3v3v3(float v[3], const float v1[3], const float v2[3], const float v3[3])
void BLI_memarena_free(struct MemArena *ma) ATTR_NONNULL(1)
struct MemArena * BLI_memarena_new(size_t bufsize, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL ATTR_NONNULL(2) ATTR_MALLOC
#define BLI_MEMARENA_STD_BUFSIZE
void * BLI_memarena_alloc(struct MemArena *ma, size_t size) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_ALLOC_SIZE(2)
void void BLI_memarena_clear(MemArena *ma) ATTR_NONNULL(1)
int BLI_sortutil_cmp_float(const void *a_, const void *b_)
Strict compiler flags for areas of code we want to ensure don't do conversions without us knowing abo...
#define UNPACK3_EX(pre, a, post)
#define POINTER_FROM_INT(i)
#define UNUSED_VARS_NDEBUG(...)
#define POINTER_AS_INT(i)
#define STACK_DECLARE(stack)
#define STACK_SIZE(stack)
#define STACK_INIT(stack, stack_num)
#define STACK_PUSH_RET(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)
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.
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_loose(BMesh *bm, BMFace *f)
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.
bool BM_vert_splice_check_double(BMVert *v_a, BMVert *v_b)
void BM_mesh_edgesplit(BMesh *bm, const bool use_verts, const bool tag_only, const bool copy_select)
#define BM_elem_index_get(ele)
#define BM_elem_flag_disable(ele, hflag)
#define BM_elem_flag_test(ele, hflag)
#define BM_elem_flag_enable(ele, hflag)
static void edge_verts_add(struct ISectState *s, BMEdge *e, BMVert *v, const bool use_test)
#define KEY_EDGE_TRI_ORDER(k)
static bool bm_loop_filter_fn(const BMLoop *l, void *user_data)
static void raycast_callback(void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *UNUSED(hit))
static void vert_dissolve_add(struct ISectState *s, BMVert *v)
static bool ghash_insert_link(GHash *gh, void *key, void *val, bool use_test, MemArena *mem_arena)
static BMVert * bm_isect_edge_tri(struct ISectState *s, BMVert *e_v0, BMVert *e_v1, BMVert *t[3], const int t_index, const float *t_cos[3], const float t_nor[3], enum ISectType *r_side)
#define KEY_SET(k, i0, i1, i2, i3)
#define STACK_PUSH_TEST_B(ele)
#define STACK_PUSH_TEST_A(ele)
static void tri_v3_scale(float v1[3], float v2[3], float v3[3], const float t)
static enum ISectType intersect_line_tri(const float p0[3], const float p1[3], const float *t_cos[3], const float t_nor[3], float r_ix[3], const struct ISectEpsilon *e)
bool BM_mesh_intersect(BMesh *bm, struct BMLoop *(*looptris)[3], const int looptris_tot, int(*test_fn)(BMFace *f, void *user_data), void *user_data, const bool use_self, const bool use_separate, const bool use_dissolve, const bool use_island_connect, const bool use_partial_connect, const bool use_edge_tag, const int boolean_mode, const float eps)
static void bm_isect_tri_tri(struct ISectState *s, int a_index, int b_index, BMLoop **a, BMLoop **b, bool no_shared)
static BMEdge * bm_vert_other_edge(BMVert *v, BMEdge *e)
static void edge_verts_sort(const float co[3], struct LinkBase *v_ls_base)
static void face_edges_split(BMesh *bm, BMFace *f, struct LinkBase *e_ls_base, bool use_island_connect, bool use_partial_connect, MemArena *mem_arena_edgenet)
static void face_edges_add(struct ISectState *s, const int f_index, BMEdge *e, const bool use_test)
static int isect_bvhtree_point_v3(BVHTree *tree, const float **looptris, const float co[3])
@ BMESH_ISECT_BOOLEAN_DIFFERENCE
@ BMESH_ISECT_BOOLEAN_NONE
@ BMESH_ISECT_BOOLEAN_UNION
@ BMESH_ISECT_BOOLEAN_ISECT
#define BM_ITER_MESH_MUTABLE(ele, ele_next, iter, bm, itype)
ATTR_WARN_UNUSED_RESULT BMesh * bm
void BM_select_history_clear(BMesh *bm)
void BM_mesh_elem_hflag_disable_all(BMesh *bm, const char htype, const char hflag, const bool respecthide)
void BM_mesh_elem_table_ensure(BMesh *bm, const char htype)
void BM_mesh_elem_index_ensure(BMesh *bm, const char htype)
BMVert * BM_edge_split(BMesh *bm, BMEdge *e, BMVert *v, BMEdge **r_e, float fac)
Edge Split.
BMEdge * BM_vert_collapse_edge(BMesh *bm, BMEdge *e_kill, BMVert *v_kill, const bool do_del, const bool kill_degenerate_faces, const bool kill_duplicate_faces)
Vert Collapse Faces.
void BM_face_calc_point_in_face(const BMFace *f, float r_co[3])
void BM_face_normal_flip(BMesh *bm, BMFace *f)
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)
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)
#define BM_ELEM_API_FLAG_DISABLE(element, f)
#define BM_ELEM_API_FLAG_TEST(element, f)
BMEdge * BM_edge_exists(BMVert *v_a, BMVert *v_b)
bool BM_vert_pair_share_face_check(BMVert *v_a, BMVert *v_b)
int BM_mesh_calc_face_groups(BMesh *bm, int *r_groups_array, int(**r_group_index)[2], BMLoopFilterFunc filter_fn, BMLoopPairFilterFunc filter_pair_fn, void *user_data, const char hflag_test, const char htype_step)
bool BM_edge_in_face(const BMEdge *e, const BMFace *f)
bool BM_face_share_edge_check(BMFace *f1, BMFace *f2)
bool BM_vert_is_edge_pair(const BMVert *v)
BLI_INLINE BMVert * BM_edge_other_vert(BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE bool BM_vert_in_edge(const 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
SyclQueue void void size_t num_bytes void
static MemArena * mem_arena
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
struct BMLoop * radial_next
struct ISectEpsilon epsilon
int(* test_fn)(BMFace *f, void *user_data)
struct IsectRayAABB_Precalc ray