Blender V4.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
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_pbvh.hh"
18#include "BKE_subdiv_ccg.hh"
19
20struct BMVert;
21struct Depsgraph;
22struct Object;
23
25
27 std::queue<int> queue;
29
30 FillDataMesh(int size) : visited_verts(size) {}
31
32 void add_initial(int vertex);
34 void add_and_skip_initial(int vertex);
35 void execute(Object &object,
36 GroupedSpan<int> vert_to_face_map,
37 FunctionRef<bool(int from_v, int to_v)> func);
38};
39
41 std::queue<SubdivCCGCoord> queue;
43
44 FillDataGrids(int size) : visited_verts(size) {}
45
46 void add_initial(SubdivCCGCoord vertex);
47 void add_initial(const CCGKey &key, Span<int> verts);
48 void add_and_skip_initial(SubdivCCGCoord vertex, int index);
49 void execute(
50 Object &object,
51 const SubdivCCG &subdiv_ccg,
52 FunctionRef<bool(SubdivCCGCoord from_v, SubdivCCGCoord to_v, bool is_duplicate)> func);
53};
54
56 std::queue<BMVert *> queue;
58
59 FillDataBMesh(int size) : visited_verts(size) {}
60
61 void add_initial(BMVert *vertex);
63 void add_and_skip_initial(BMVert *vertex, int index);
64 void execute(Object &object, FunctionRef<bool(BMVert *from_v, BMVert *to_v)> func);
65};
66
67} // namespace blender::ed::sculpt_paint::flood_fill
ATTR_WARN_UNUSED_RESULT BMesh * bm
static float verts[][3]
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)
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)