Blender V5.3
bmesh_edgeloop.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2013 by Campbell Barton. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
10
11#include "bmesh_class.hh"
12
13#include "DNA_listBase.h"
14
15#include "BLI_function_ref.hh"
16#include "BLI_set.hh"
17
18namespace blender {
19
20struct BMEdgeLoopStore;
21struct LinkData;
22
32
33/* multiple edgeloops (ListBase) */
38 ListBaseT<BMEdgeLoopStore> *r_eloops,
39 FunctionRef<bool(BMEdge *)> test_fn,
40 const BMEdgeLoopFind_Params *params = nullptr);
42 ListBaseT<BMEdgeLoopStore> *r_eloops,
43 FunctionRef<bool(BMEdge *)> test_fn,
44 BMVert *v_src,
45 BMVert *v_dst);
46
47void BM_mesh_edgeloops_free(ListBaseT<BMEdgeLoopStore> *eloops);
48void BM_mesh_edgeloops_calc_center(BMesh *bm, ListBaseT<BMEdgeLoopStore> *eloops);
49void BM_mesh_edgeloops_calc_normal(BMesh *bm, ListBaseT<BMEdgeLoopStore> *eloops);
51 ListBaseT<BMEdgeLoopStore> *eloops,
52 const float no_align[3]);
53void BM_mesh_edgeloops_calc_order(BMesh *bm, ListBaseT<BMEdgeLoopStore> *eloops, bool use_normals);
54
60BMEdgeLoopStore *BM_edgeloop_from_verts(BMVert **v_arr, int v_arr_tot, bool is_closed);
61
62void BM_edgeloop_free(BMEdgeLoopStore *el_store);
73ListBaseT<LinkData> *BM_edgeloop_verts_get(BMEdgeLoopStore *el_store);
74const float *BM_edgeloop_normal_get(BMEdgeLoopStore *el_store);
75const float *BM_edgeloop_center_get(BMEdgeLoopStore *el_store);
79void BM_edgeloop_edges_get(BMEdgeLoopStore *el_store, BMEdge **e_arr);
89 BMEdgeLoopStore *el_store,
90 const float no_align[3]);
93 BMEdgeLoopStore *el_store,
94 int el_store_len,
95 bool split,
96 Set<BMEdge *> *split_edges);
97
98bool BM_edgeloop_overlap_check(BMEdgeLoopStore *el_store_a, BMEdgeLoopStore *el_store_b);
99
100#define BM_EDGELINK_NEXT(el_store, elink) \
101 (elink)->next ? \
102 (elink)->next : \
103 (BM_edgeloop_is_closed(el_store) ? (LinkData *)BM_edgeloop_verts_get(el_store)->first() : \
104 NULL)
105
106#define BM_EDGELOOP_NEXT(el_store) \
107 (CHECK_TYPE_INLINE(el_store, BMEdgeLoopStore *), (BMEdgeLoopStore *)((LinkData *)el_store)->next)
108
109} // namespace blender
These structs are the foundation for all linked lists in the library system.
void split(const std::string &s, const char delim, std::vector< std::string > &tokens)
Definition abc_util.cc:68
BMesh Iterators.
bool BM_edgeloop_calc_normal_aligned(BMesh *, BMEdgeLoopStore *el_store, const float no_align[3])
BMEdgeLoopStore * BM_edgeloop_from_verts(BMVert **v_arr, const int v_arr_tot, bool is_closed)
ListBaseT< LinkData > * BM_edgeloop_verts_get(BMEdgeLoopStore *el_store)
int BM_mesh_edgeloops_find(BMesh *bm, ListBaseT< BMEdgeLoopStore > *r_eloops, FunctionRef< bool(BMEdge *)> test_fn, const BMEdgeLoopFind_Params *params)
bool BM_edgeloop_is_closed_junction(BMEdgeLoopStore *el_store)
void BM_mesh_edgeloops_calc_center(BMesh *bm, ListBaseT< BMEdgeLoopStore > *eloops)
void BM_edgeloop_flip(BMesh *, BMEdgeLoopStore *el_store)
void BM_edgeloop_expand(BMesh *bm, BMEdgeLoopStore *el_store, int el_store_len, bool split, Set< BMEdge * > *split_edges)
void BM_mesh_edgeloops_free(ListBaseT< BMEdgeLoopStore > *eloops)
void BM_edgeloop_free(BMEdgeLoopStore *el_store)
void BM_mesh_edgeloops_calc_normal(BMesh *bm, ListBaseT< BMEdgeLoopStore > *eloops)
const float * BM_edgeloop_normal_get(BMEdgeLoopStore *el_store)
bool BM_mesh_edgeloops_find_path(BMesh *bm, ListBaseT< BMEdgeLoopStore > *r_eloops, FunctionRef< bool(BMEdge *)> test_fn, BMVert *v_src, BMVert *v_dst)
bool BM_edgeloop_is_closed(BMEdgeLoopStore *el_store)
void BM_mesh_edgeloops_calc_normal_aligned(BMesh *bm, ListBaseT< BMEdgeLoopStore > *eloops, const float no_align[3])
int BM_edgeloop_length_get(BMEdgeLoopStore *el_store)
const float * BM_edgeloop_center_get(BMEdgeLoopStore *el_store)
void BM_edgeloop_edges_get(BMEdgeLoopStore *el_store, BMEdge **e_arr)
void BM_edgeloop_calc_center(BMesh *, BMEdgeLoopStore *el_store)
BMEdgeLoopStore * BM_edgeloop_copy(BMEdgeLoopStore *el_store)
bool BM_edgeloop_overlap_check(BMEdgeLoopStore *el_store_a, BMEdgeLoopStore *el_store_b)
bool BM_edgeloop_calc_normal(BMesh *, BMEdgeLoopStore *el_store)
void BM_mesh_edgeloops_calc_order(BMesh *, ListBaseT< BMEdgeLoopStore > *eloops, const bool use_normals)