Blender V5.0
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
11
12#include "WEdge.h"
13
14#include "../geometry/Grid.h"
15#include "../geometry/Polygon.h"
16
17#include "MEM_guardedalloc.h"
18
19namespace Freestyle {
20
21class WFillGrid {
22 public:
23 inline WFillGrid(Grid *grid = nullptr, WingedEdge *winged_edge = nullptr)
24 {
25 _winged_edge = winged_edge;
26 _grid = grid;
27 _polygon_id = 0;
28 }
29
30 virtual ~WFillGrid() {}
31
32 void fillGrid();
33
36 {
37 return _winged_edge;
38 }
39
41 {
42 return _grid;
43 }
44
46 void setWingedEdge(WingedEdge *winged_edge)
47 {
48 if (winged_edge) {
49 _winged_edge = winged_edge;
50 }
51 }
52
53 void setGrid(Grid *grid)
54 {
55 if (grid) {
56 _grid = grid;
57 }
58 }
59
60 private:
61 Grid *_grid;
62 WingedEdge *_winged_edge;
63 uint _polygon_id;
64
65 MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WFillGrid")
66};
67
68} /* 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:53
virtual ~WFillGrid()
Definition WFillGrid.h:30
void setWingedEdge(WingedEdge *winged_edge)
Definition WFillGrid.h:46
WFillGrid(Grid *grid=nullptr, WingedEdge *winged_edge=nullptr)
Definition WFillGrid.h:23
WingedEdge * getWingedEdge()
Definition WFillGrid.h:35
inherits from class Rep
Definition AppCanvas.cpp:20