Blender
V5.3
source
blender
bmesh
intern
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
"
14
#include "
BLI_compiler_compat.hh
"
15
16
#include "
bmesh_class.hh
"
17
#include "
intern/bmesh_query.hh
"
18
19
namespace
blender
{
20
21
ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL
(1, 2)
22
BLI_INLINE
BMDiskLink
*bmesh_disk_edge_link_from_vert(const
BMEdge
*
e
, const
BMVert
*
v
)
23
{
24
BLI_assert
(
BM_vert_in_edge
(
e
,
v
));
25
return
const_cast<
BMDiskLink
*
>
(&(&
e
->v1_disk_link)[
v
==
e
->v2]);
26
}
27
35
ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL
(1)
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
47
ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL
(1)
48
BLI_INLINE
BMEdge
*
bmesh_disk_edge_prev_safe
(const
BMEdge
*
e
, const
BMVert
*
v
)
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
59
ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL
(1, 2)
BLI_INLINE
BMEdge
*
bmesh_disk_edge_next
(const
BMEdge
*
e
,
60
const
BMVert
*
v
)
61
{
62
return
BM_DISK_EDGE_NEXT
(
e
,
v
);
63
}
64
65
ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL
(1, 2)
BLI_INLINE
BMEdge
*
bmesh_disk_edge_prev
(const
BMEdge
*
e
,
66
const
BMVert
*
v
)
67
{
68
return
BM_DISK_EDGE_PREV
(
e
,
v
);
69
}
70
71
}
// namespace blender
ATTR_WARN_UNUSED_RESULT
#define ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL
#define ATTR_NONNULL(...)
BLI_compiler_attrs.hh
BLI_compiler_compat.hh
BLI_INLINE
#define BLI_INLINE
bmesh_class.hh
BM_DISK_EDGE_NEXT
#define BM_DISK_EDGE_NEXT(e, v)
Definition
bmesh_class.hh:702
BM_DISK_EDGE_PREV
#define BM_DISK_EDGE_PREV(e, v)
Definition
bmesh_class.hh:707
bmesh_query.hh
if
if(state< num_states)
Definition
kernel/device/gpu/kernel.h:65
blender
BMesh Iterators.
Definition
ANIM_action.hh:30
blender::BLI_assert
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
blender::bmesh_disk_edge_prev_safe
BLI_INLINE BMEdge * bmesh_disk_edge_prev_safe(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
blender::v
ATTR_WARN_UNUSED_RESULT const BMVert * v
Definition
bmesh_query_inline.hh:25
blender::BM_vert_in_edge
BLI_INLINE bool BM_vert_in_edge(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
blender::if
if(data)
Definition
bmesh_operator_api_inline.hh:171
blender::bmesh_disk_edge_next_safe
BLI_INLINE BMEdge * bmesh_disk_edge_next_safe(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
blender::bmesh_disk_edge_prev
BLI_INLINE BMEdge * bmesh_disk_edge_prev(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
blender::bmesh_disk_edge_next
BLI_INLINE BMEdge * bmesh_disk_edge_next(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
blender::ATTR_WARN_UNUSED_RESULT
bool ATTR_WARN_UNUSED_RESULT
Definition
BLI_path_utils.hh:36
blender::ATTR_NONNULL
void ATTR_NONNULL(1, 2)
blender::e
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
Definition
bmesh_query_inline.hh:44
blender::BMDiskLink
Definition
bmesh_class.hh:120
blender::BMEdge
Definition
bmesh_class.hh:124
blender::BMVert
Definition
bmesh_class.hh:94
Generated on
for Blender by
doxygen
1.18.0