Blender  V2.93
NodeDrawingStyle.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
17 #pragma once
18 
25 #include "DrawingStyle.h"
26 #include "NodeGroup.h"
27 
28 #include "../system/FreestyleConfig.h"
29 
30 namespace Freestyle {
31 
32 class NodeDrawingStyle : public NodeGroup {
33  public:
35  {
36  }
38  {
39  }
40 
41  inline const DrawingStyle &drawingStyle() const
42  {
43  return _DrawingStyle;
44  }
45 
46  inline void setDrawingStyle(const DrawingStyle &iDrawingStyle)
47  {
48  _DrawingStyle = iDrawingStyle;
49  }
50 
52  inline void setStyle(const DrawingStyle::STYLE iStyle)
53  {
54  _DrawingStyle.setStyle(iStyle);
55  }
56 
58  inline void setLineWidth(const float iLineWidth)
59  {
60  _DrawingStyle.setLineWidth(iLineWidth);
61  }
62 
64  inline void setPointSize(const float iPointSize)
65  {
66  _DrawingStyle.setPointSize(iPointSize);
67  }
68 
70  inline void setLightingEnabled(const bool iEnableLighting)
71  {
72  _DrawingStyle.setLightingEnabled(iEnableLighting);
73  }
74 
76  virtual void accept(SceneVisitor &v);
77 
79  inline DrawingStyle::STYLE style() const
80  {
81  return _DrawingStyle.style();
82  }
83 
84  inline float lineWidth() const
85  {
86  return _DrawingStyle.lineWidth();
87  }
88 
89  inline float pointSize() const
90  {
91  return _DrawingStyle.pointSize();
92  }
93 
94  inline bool lightingEnabled() const
95  {
96  return _DrawingStyle.lightingEnabled();
97  }
98 
99  private:
100  DrawingStyle _DrawingStyle;
101 
102 #ifdef WITH_CXX_GUARDEDALLOC
103  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:NodeDrawingStyle")
104 #endif
105 };
106 
107 } /* namespace Freestyle */
Class to define the drawing style of a node.
Class to represent a group node. This node can contains several children.
ATTR_WARN_UNUSED_RESULT const BMVert * v
bool lightingEnabled() const
Definition: DrawingStyle.h:91
float lineWidth() const
Definition: DrawingStyle.h:81
void setLineWidth(const float iLineWidth)
Definition: DrawingStyle.h:61
void setStyle(const STYLE iStyle)
Definition: DrawingStyle.h:56
void setPointSize(const float iPointSize)
Definition: DrawingStyle.h:66
float pointSize() const
Definition: DrawingStyle.h:86
void setLightingEnabled(const bool on)
Definition: DrawingStyle.h:71
DrawingStyle::STYLE style() const
const DrawingStyle & drawingStyle() const
void setDrawingStyle(const DrawingStyle &iDrawingStyle)
void setPointSize(const float iPointSize)
void setStyle(const DrawingStyle::STYLE iStyle)
virtual void accept(SceneVisitor &v)
void setLineWidth(const float iLineWidth)
void setLightingEnabled(const bool iEnableLighting)
inherits from class Rep
Definition: AppCanvas.cpp:32