Utility function to get the first loop of a vert. Behaves identical to

the iterator initialization function.
This commit is contained in:
Antony Riakiotakis
2012-06-27 15:39:14 +00:00
parent 7518654a51
commit df201548ea
2 changed files with 12 additions and 0 deletions

View File

@@ -189,6 +189,17 @@ BMLoop *BM_loop_other_vert_loop(BMLoop *l, BMVert *v)
#endif
}
/**
* Get the first loop of a vert. Uses the same initialization code for the first loop of the
* iterator API
*/
BMLoop *BM_vert_find_first_loop(BMVert *v)
{
BMEdge *e = bmesh_disk_faceedge_find_first(v->e, v);
return bmesh_radial_faceloop_find_first(e->l, v);
}
/**
* Returns TRUE if the vertex is used in a given face.
*/

View File

@@ -42,6 +42,7 @@ BMVert *BM_edge_other_vert(BMEdge *e, BMVert *v);
BMLoop *BM_face_other_edge_loop(BMFace *f, BMEdge *e, BMVert *v);
BMLoop *BM_face_other_vert_loop(BMFace *f, BMVert *v_prev, BMVert *v);
BMLoop *BM_loop_other_vert_loop(BMLoop *l, BMVert *v);
BMLoop *BM_vert_find_first_loop(BMVert *v);
int BM_vert_edge_count_nonwire(BMVert *v);
int BM_vert_edge_count(BMVert *v);