Blender V5.3
sculpt_flood_fill.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include <queue>
12
13#include "BLI_bit_vector.hh"
14#include "BLI_function_ref.hh"
15#include "BLI_offset_indices.hh"
16
17#include "BKE_paint_bvh.hh"
18#include "BKE_subdiv_ccg.hh"
19
20namespace blender {
21
22struct BMVert;
23struct Depsgraph;
24struct Object;
25
27
29 std::queue<int> queue;
32
33 FillDataMesh(int size) : visited_verts(size) {}
39
40 void add_initial(int vertex);
41 void add_initial(Span<int> verts);
43 void execute(Object &object,
44 GroupedSpan<int> vert_to_face_map,
45 FunctionRef<bool(int from_v, int to_v)> func);
46};
47
49 std::queue<SubdivCCGCoord> queue;
52
53 FillDataGrids(int size) : visited_verts(size) {}
59
61 void add_initial(const CCGKey &key, Span<int> verts);
63 void execute(
64 Object &object,
65 const SubdivCCG &subdiv_ccg,
66 FunctionRef<bool(SubdivCCGCoord from_v, SubdivCCGCoord to_v, bool is_duplicate)> func);
67};
68
70 std::queue<BMVert *> queue;
73
74 FillDataBMesh(int size) : visited_verts(size) {}
80
82 void add_initial(BMesh &bm, Span<int> verts);
84 void execute(Object &object, FunctionRef<bool(BMVert *from_v, BMVert *to_v)> func);
85};
86
87} // namespace ed::sculpt_paint::flood_fill
88
89} // namespace blender
A BVH for high poly meshes.
constexpr int64_t size() const
Definition BLI_span.hh:256
constexpr bool is_empty() const
Definition BLI_span.hh:264
#define vertex
BMesh Iterators.
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
FillDataBMesh(int size, Span< int > fake_neighbors)
void execute(Object &object, FunctionRef< bool(BMVert *from_v, BMVert *to_v)> func)
void execute(Object &object, const SubdivCCG &subdiv_ccg, FunctionRef< bool(SubdivCCGCoord from_v, SubdivCCGCoord to_v, bool is_duplicate)> func)
FillDataGrids(int size, Span< int > fake_neighbors)
void add_and_skip_initial(SubdivCCGCoord vertex, int index)
void execute(Object &object, GroupedSpan< int > vert_to_face_map, FunctionRef< bool(int from_v, int to_v)> func)
FillDataMesh(int size, Span< int > fake_neighbors)