Blender V5.0
bmesh_structure_inline.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10
11#pragma once
12
13#include "BLI_compiler_attrs.h"
14#include "BLI_compiler_compat.h"
15
16#include "bmesh_class.hh"
17#include "intern/bmesh_query.hh"
18
20 BLI_INLINE BMDiskLink *bmesh_disk_edge_link_from_vert(const BMEdge *e, const BMVert *v)
21{
23 return (BMDiskLink *)&(&e->v1_disk_link)[v == e->v2];
24}
25
35{
36 if (v == e->v1) {
37 return e->v1_disk_link.next;
38 }
39 if (v == e->v2) {
40 return e->v2_disk_link.next;
41 }
42 return nullptr;
43}
44
47{
48 if (v == e->v1) {
49 return e->v1_disk_link.prev;
50 }
51 if (v == e->v2) {
52 return e->v2_disk_link.prev;
53 }
54 return nullptr;
55}
56
58 const BMVert *v)
59{
60 return BM_DISK_EDGE_NEXT(e, v);
61}
62
64 const BMVert *v)
65{
66 return BM_DISK_EDGE_PREV(e, v);
67}
#define BLI_assert(a)
Definition BLI_assert.h:46
#define ATTR_WARN_UNUSED_RESULT
#define ATTR_NONNULL(...)
#define BLI_INLINE
#define BM_DISK_EDGE_NEXT(e, v)
#define BM_DISK_EDGE_PREV(e, v)
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
ATTR_WARN_UNUSED_RESULT const BMVert * v
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_next_safe(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()
BLI_INLINE BMEdge * bmesh_disk_edge_next(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()