Changeset View
Changeset View
Standalone View
Standalone View
source/blender/bmesh/intern/bmesh_query.c
| Show First 20 Lines • Show All 201 Lines • ▼ Show 20 Lines | BM_ITER_ELEM (f, &iter, v_a, BM_FACES_OF_VERT) { | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| return false; | return false; | ||||
| } | } | ||||
| BMFace *BM_vert_pair_shared_face_cb(BMVert *v_a, | |||||
| BMVert *v_b, | |||||
| const bool allow_adjacent, | |||||
| bool (*callback)(BMFace *, BMLoop *, BMLoop *, void *userdata), | |||||
| void *user_data, | |||||
| BMLoop **r_l_a, | |||||
| BMLoop **r_l_b) | |||||
| { | |||||
| if (v_a->e && v_b->e) { | |||||
| BMIter iter; | |||||
| BMLoop *l_a, *l_b; | |||||
| BM_ITER_ELEM (l_a, &iter, v_a, BM_LOOPS_OF_VERT) { | |||||
| BMFace *f = l_a->f; | |||||
| l_b = BM_face_vert_share_loop(f, v_b); | |||||
| if (l_b && (allow_adjacent || !BM_loop_is_adjacent(l_a, l_b)) && | |||||
| callback(f, l_a, l_b, user_data)) { | |||||
| *r_l_a = l_a; | |||||
| *r_l_b = l_b; | |||||
| return f; | |||||
| } | |||||
| } | |||||
| } | |||||
| return NULL; | |||||
| } | |||||
| /** | /** | ||||
| * Given 2 verts, find the smallest face they share and give back both loops. | * Given 2 verts, find the smallest face they share and give back both loops. | ||||
| */ | */ | ||||
| BMFace *BM_vert_pair_share_face_by_len( | BMFace *BM_vert_pair_share_face_by_len( | ||||
| BMVert *v_a, BMVert *v_b, BMLoop **r_l_a, BMLoop **r_l_b, const bool allow_adjacent) | BMVert *v_a, BMVert *v_b, BMLoop **r_l_a, BMLoop **r_l_b, const bool allow_adjacent) | ||||
| { | { | ||||
| BMLoop *l_cur_a = NULL, *l_cur_b = NULL; | BMLoop *l_cur_a = NULL, *l_cur_b = NULL; | ||||
| BMFace *f_cur = NULL; | BMFace *f_cur = NULL; | ||||
| ▲ Show 20 Lines • Show All 2,592 Lines • Show Last 20 Lines | |||||