diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-06-27 14:03:50 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-06-27 14:28:02 +0400 |
commit | 07a5caad5fad742196aa4df0e251aaf4f0568563 (patch) | |
tree | de6e97b0b3dd176e4b7a83124f66810c086b4be7 /source/blender/bmesh/bmesh_class.h | |
parent | cba34986298b89df2c56c90a04fdeb0155258187 (diff) |
BMesh: use slightly faster method of stepping over edge-disks
Diffstat (limited to 'source/blender/bmesh/bmesh_class.h')
-rw-r--r-- | source/blender/bmesh/bmesh_class.h | 9 |
1 files changed, 9 insertions, 0 deletions
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. |