Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-12-23 09:03:07 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-12-23 09:03:07 +0400
commit63a2cc2ab76794f5645f5b9289199ac9b1a8974c (patch)
tree875d8a60023b4b14493aab88ef16c2ce3f6ef0f5 /source/blender/bmesh/intern/bmesh_structure_inline.h
parent2a2c27b175edc204206f502a18398b8c50cfca76 (diff)
BMesh API: make simple, low level functions inline
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_structure_inline.h')
-rw-r--r--source/blender/bmesh/intern/bmesh_structure_inline.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_structure_inline.h b/source/blender/bmesh/intern/bmesh_structure_inline.h
new file mode 100644
index 00000000000..c29acaa724c
--- /dev/null
+++ b/source/blender/bmesh/intern/bmesh_structure_inline.h
@@ -0,0 +1,55 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/bmesh/intern/bmesh_structure_inline.h
+ * \ingroup bmesh
+ *
+ * BMesh inline operator functions.
+ */
+
+#ifndef __BMESH_STRUCTURE_INLINE_H__
+#define __BMESH_STRUCTURE_INLINE_H__
+
+/**
+ * \brief Next Disk Edge
+ *
+ * Find the next edge in a disk cycle
+ *
+ * \return Pointer to the next edge in the disk cycle for the vertex v.
+ */
+BLI_INLINE BMEdge *bmesh_disk_edge_next(const BMEdge *e, const BMVert *v)
+{
+ if (v == e->v1)
+ return e->v1_disk_link.next;
+ if (v == e->v2)
+ return e->v2_disk_link.next;
+ return NULL;
+}
+
+BLI_INLINE BMEdge *bmesh_disk_edge_prev(const BMEdge *e, const BMVert *v)
+{
+ if (v == e->v1)
+ return e->v1_disk_link.prev;
+ if (v == e->v2)
+ return e->v2_disk_link.prev;
+ return NULL;
+}
+
+#endif /* __BMESH_STRUCTURE_INLINE_H__ */