void bmiter__loop_of_vert_begin(BMIter *iter) { init_iterator(iter); iter->count = 0; if (iter->vdata->e) iter->count = bmesh_disk_facevert_count(iter->vdata); if (iter->count) { iter->e_first = bmesh_disk_faceedge_find_first(iter->vdata->e, iter->vdata); iter->e_next = iter->e_first; iter->l_first = bmesh_radial_faceloop_find_first(iter->e_first->l, iter->vdata); iter->l_next = iter->l_first; } }
void bmiter__face_of_vert_begin(BMIter *iter) { init_iterator(iter); iter->count = 0; if (iter->vdata->e) iter->count = bmesh_disk_facevert_count(iter->vdata); if (iter->count) { iter->firstedge = bmesh_disk_faceedge_find_first(iter->vdata->e, iter->vdata); iter->nextedge = iter->firstedge; iter->firstloop = bmesh_radial_faceloop_find_first(iter->firstedge->l, iter->vdata); iter->nextloop = iter->firstloop; } }
void *bmiter__face_of_vert_step(BMIter *iter) { BMLoop *current = iter->l_next; if (iter->count && iter->l_next) { iter->count--; iter->l_next = bmesh_radial_faceloop_find_next(iter->l_next, iter->vdata); if (iter->l_next == iter->l_first) { iter->e_next = bmesh_disk_faceedge_find_next(iter->e_next, iter->vdata); iter->l_first = bmesh_radial_faceloop_find_first(iter->e_next->l, iter->vdata); iter->l_next = iter->l_first; } } if (!iter->count) iter->l_next = NULL; return current ? current->f : NULL; }
void *bmiter__face_of_vert_step(BMIter *iter) { BMLoop *current = iter->nextloop; if (iter->count && iter->nextloop) { iter->count--; iter->nextloop = bmesh_radial_faceloop_find_next(iter->nextloop, iter->vdata); if (iter->nextloop == iter->firstloop) { iter->nextedge = bmesh_disk_faceedge_find_next(iter->nextedge, iter->vdata); iter->firstloop = bmesh_radial_faceloop_find_first(iter->nextedge->l, iter->vdata); iter->nextloop = iter->firstloop; } } if (!iter->count) iter->nextloop = NULL; return current ? current->f : NULL; }