Blender V4.3
WFillGrid.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
12#include "WEdge.h"
13
14#include "../geometry/Grid.h"
15#include "../geometry/Polygon.h"
16
17#ifdef WITH_CXX_GUARDEDALLOC
18# include "MEM_guardedalloc.h"
19#endif
20
21namespace Freestyle {
22
23class WFillGrid {
24 public:
25 inline WFillGrid(Grid *grid = nullptr, WingedEdge *winged_edge = nullptr)
26 {
27 _winged_edge = winged_edge;
28 _grid = grid;
29 _polygon_id = 0;
30 }
31
32 virtual ~WFillGrid() {}
33
34 void fillGrid();
35
38 {
39 return _winged_edge;
40 }
41
43 {
44 return _grid;
45 }
46
48 void setWingedEdge(WingedEdge *winged_edge)
49 {
50 if (winged_edge) {
51 _winged_edge = winged_edge;
52 }
53 }
54
55 void setGrid(Grid *grid)
56 {
57 if (grid) {
58 _grid = grid;
59 }
60 }
61
62 private:
63 Grid *_grid;
64 WingedEdge *_winged_edge;
65 uint _polygon_id;
66
67#ifdef WITH_CXX_GUARDEDALLOC
68 MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WFillGrid")
69#endif
70};
71
72} /* namespace Freestyle */
unsigned int uint
Base class to define a cell grid surrounding the bounding box of the scene.
Read Guarded memory(de)allocation.
Class to define a polygon.
Classes to define a Winged Edge data structure.
void setGrid(Grid *grid)
Definition WFillGrid.h:55
virtual ~WFillGrid()
Definition WFillGrid.h:32
void setWingedEdge(WingedEdge *winged_edge)
Definition WFillGrid.h:48
WFillGrid(Grid *grid=nullptr, WingedEdge *winged_edge=nullptr)
Definition WFillGrid.h:25
WingedEdge * getWingedEdge()
Definition WFillGrid.h:37
inherits from class Rep
Definition AppCanvas.cpp:20