BMesh: add BM_loop_other_vert_loop_by_edge
This commit is contained in:
parent
705015e0a4
commit
b51b893df8
|
@ -157,6 +157,37 @@ BMLoop *BM_loop_other_vert_loop(BMLoop *l, BMVert *v)
|
|||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the other loop that uses this edge.
|
||||
*
|
||||
* In this case the loop defines the vertex,
|
||||
* the edge passed in defines the direction to step.
|
||||
*
|
||||
* <pre>
|
||||
* +----------+ <-- Return the face-loop of this vertex.
|
||||
* | |
|
||||
* | e | <-- This edge defines the direction.
|
||||
* | |
|
||||
* +----------+ <-- This loop defines the face and vertex..
|
||||
* l
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
BMLoop *BM_loop_other_vert_loop_by_edge(BMLoop *l, BMEdge *e)
|
||||
{
|
||||
BLI_assert(BM_vert_in_edge(e, l->v));
|
||||
if (l->e == e) {
|
||||
return l->next;
|
||||
}
|
||||
else if (l->prev->e == e) {
|
||||
return l->prev;
|
||||
}
|
||||
else {
|
||||
BLI_assert(0);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if verts share a face.
|
||||
*/
|
||||
|
|
|
@ -48,6 +48,8 @@ BMLoop *BM_face_other_edge_loop(BMFace *f, BMEdge *e, BMVert *v) ATTR_WARN_UNUSE
|
|||
BMLoop *BM_loop_other_edge_loop(BMLoop *l, BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
|
||||
BMLoop *BM_face_other_vert_loop(BMFace *f, BMVert *v_prev, BMVert *v) ATTR_WARN_UNUSED_RESULT
|
||||
ATTR_NONNULL();
|
||||
BMLoop *BM_loop_other_vert_loop_by_edge(BMLoop *l, BMEdge *e) ATTR_WARN_UNUSED_RESULT
|
||||
ATTR_NONNULL();
|
||||
BMLoop *BM_loop_other_vert_loop(BMLoop *l, BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
|
||||
BMLoop *BM_vert_step_fan_loop(BMLoop *l, BMEdge **e_step) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
|
||||
|
||||
|
|
Loading…
Reference in New Issue