Blender  V2.93
bmesh_structure_inline.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
23 #pragma once
24 
26  BLI_INLINE BMDiskLink *bmesh_disk_edge_link_from_vert(const BMEdge *e, const BMVert *v)
27 {
29  return (BMDiskLink *)&(&e->v1_disk_link)[v == e->v2];
30 }
31 
41 {
42  if (v == e->v1) {
43  return e->v1_disk_link.next;
44  }
45  if (v == e->v2) {
46  return e->v2_disk_link.next;
47  }
48  return NULL;
49 }
50 
53 {
54  if (v == e->v1) {
55  return e->v1_disk_link.prev;
56  }
57  if (v == e->v2) {
58  return e->v2_disk_link.prev;
59  }
60  return NULL;
61 }
62 
64  const BMVert *v)
65 {
66  return BM_DISK_EDGE_NEXT(e, v);
67 }
68 
70  const BMVert *v)
71 {
72  return BM_DISK_EDGE_PREV(e, v);
73 }
#define BLI_assert(a)
Definition: BLI_assert.h:58
#define BLI_INLINE
void BLI_kdtree_nd_() int BLI_kdtree_nd_() int BLI_kdtree_nd_() int BLI_kdtree_nd_() ATTR_WARN_UNUSED_RESULT
#define BM_DISK_EDGE_NEXT(e, v)
Definition: bmesh_class.h:556
#define BM_DISK_EDGE_PREV(e, v)
Definition: bmesh_class.h:561
BLI_INLINE bool BM_vert_in_edge(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
BLI_INLINE BMEdge * bmesh_disk_edge_next(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE BMEdge * bmesh_disk_edge_next_safe(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE BMEdge * bmesh_disk_edge_prev(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE BMEdge * bmesh_disk_edge_prev_safe(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2) BLI_INLINE BMDiskLink *bmesh_disk_edge_link_from_vert(const BMEdge *e
ATTR_WARN_UNUSED_RESULT const BMVert * v