Blender V4.3
WSFillGrid.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
17namespace Freestyle {
18
20 public:
21 inline WSFillGrid(Grid *grid = nullptr, WingedEdge *winged_edge = nullptr)
22 {
23 _winged_edge = winged_edge;
24 _grid = grid;
25 _polygon_id = 0;
26 }
27
28 virtual ~WSFillGrid() {}
29
30 void fillGrid();
31
34 {
35 return _winged_edge;
36 }
37
39 {
40 return _grid;
41 }
42
44 void setWingedEdge(WingedEdge *winged_edge)
45 {
46 if (winged_edge) {
47 _winged_edge = winged_edge;
48 }
49 }
50
51 void setGrid(Grid *grid)
52 {
53 if (grid) {
54 _grid = grid;
55 }
56 }
57
58 private:
59 Grid *_grid;
60 WingedEdge *_winged_edge;
61 uint _polygon_id;
62
63#ifdef WITH_CXX_GUARDEDALLOC
64 MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WSFillGrid")
65#endif
66};
67
68} /* namespace Freestyle */
unsigned int uint
Base class to define a cell grid surrounding the bounding box of the scene.
Class to define a polygon.
Classes to define a Winged Edge data structure.
WSFillGrid(Grid *grid=nullptr, WingedEdge *winged_edge=nullptr)
Definition WSFillGrid.h:21
void setWingedEdge(WingedEdge *winged_edge)
Definition WSFillGrid.h:44
void setGrid(Grid *grid)
Definition WSFillGrid.h:51
WingedEdge * getWingedEdge()
Definition WSFillGrid.h:33
inherits from class Rep
Definition AppCanvas.cpp:20