Blender V5.3
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.hh"
15
16#include "bmesh_class.hh"
17#include "intern/bmesh_query.hh"
18
19namespace blender {
20
22 BLI_INLINE BMDiskLink *bmesh_disk_edge_link_from_vert(const BMEdge *e, const BMVert *v)
23{
25 return const_cast<BMDiskLink *>(&(&e->v1_disk_link)[v == e->v2]);
26}
27
36 BLI_INLINE BMEdge *bmesh_disk_edge_next_safe(const BMEdge *e, const BMVert *v)
37{
38 if (v == e->v1) {
39 return e->v1_disk_link.next;
40 }
41 if (v == e->v2) {
42 return e->v2_disk_link.next;
43 }
44 return nullptr;
45}
46
49{
50 if (v == e->v1) {
51 return e->v1_disk_link.prev;
52 }
53 if (v == e->v2) {
54 return e->v2_disk_link.prev;
55 }
56 return nullptr;
57}
58
60 const BMVert *v)
61{
62 return BM_DISK_EDGE_NEXT(e, v);
63}
64
66 const BMVert *v)
67{
68 return BM_DISK_EDGE_PREV(e, v);
69}
70
71} // namespace blender
#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)
if(state< num_states)
BMesh Iterators.
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
BLI_INLINE BMEdge * bmesh_disk_edge_prev_safe(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
ATTR_WARN_UNUSED_RESULT const BMVert * v
BLI_INLINE bool BM_vert_in_edge(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_next(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
bool ATTR_WARN_UNUSED_RESULT
void ATTR_NONNULL(1, 2)
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e