From 07a5caad5fad742196aa4df0e251aaf4f0568563 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 27 Jun 2014 20:03:50 +1000 Subject: BMesh: use slightly faster method of stepping over edge-disks --- source/blender/bmesh/bmesh_class.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/blender/bmesh/bmesh_class.h') diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h index 83b02764046..01745396cd1 100644 --- a/source/blender/bmesh/bmesh_class.h +++ b/source/blender/bmesh/bmesh_class.h @@ -311,6 +311,15 @@ typedef bool (*BMElemFilterFunc)(BMElem *, void *user_data); # define BM_FACE_FIRST_LOOP(p) ((p)->l_first) #endif +#define BM_DISK_EDGE_NEXT(e, v) ( \ + CHECK_TYPE_INLINE(e, BMEdge *), CHECK_TYPE_INLINE(v, BMVert *), \ + BLI_assert(BM_vert_in_edge(e, v)), \ + (((&e->v1_disk_link)[v == e->v2]).next)) +#define BM_DISK_EDGE_PREV(e, v) ( \ + CHECK_TYPE_INLINE(e, BMEdge *), CHECK_TYPE_INLINE(v, BMVert *), \ + BLI_assert(BM_vert_in_edge(e, v)), \ + (((&e->v1_disk_link)[v == e->v2]).prev)) + /** * size to use for stack arrays when dealing with NGons, * alloc after this limit is reached. -- cgit v1.2.3