Blender  V3.3
NodeLight.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #pragma once
4 
10 #include "Node.h"
11 
12 #include "../geometry/Geom.h"
13 
14 #include "../system/FreestyleConfig.h"
15 
16 namespace Freestyle {
17 
18 using namespace Geometry;
19 
20 class NodeLight : public Node {
21  public:
22  NodeLight();
23  NodeLight(NodeLight &iBrother);
24 
25  virtual ~NodeLight()
26  {
27  }
28 
30  virtual void accept(SceneVisitor &v);
31 
33  inline const float *ambient() const
34  {
35  return Ambient;
36  }
37 
38  inline const float *diffuse() const
39  {
40  return Diffuse;
41  }
42 
43  inline const float *specular() const
44  {
45  return Specular;
46  }
47 
48  inline const float *position() const
49  {
50  return Position;
51  }
52 
53  inline bool isOn() const
54  {
55  return on;
56  }
57 
58  inline int number() const
59  {
60  return _number;
61  }
62 
63  private:
64  // Data members
65  // ============
66 
68  bool on;
69 
71  float Ambient[4];
72  float Diffuse[4];
73  float Specular[4];
74 
76  float Position[4];
77 
83  static int numberOfLights;
85  int _number;
86 };
87 
88 } /* namespace Freestyle */
Abstract class for scene graph nodes. Inherits from BaseObject which defines the addRef release mecha...
ATTR_WARN_UNUSED_RESULT const BMVert * v
const float * position() const
Definition: NodeLight.h:48
const float * diffuse() const
Definition: NodeLight.h:38
const float * ambient() const
Definition: NodeLight.h:33
const float * specular() const
Definition: NodeLight.h:43
bool isOn() const
Definition: NodeLight.h:53
virtual ~NodeLight()
Definition: NodeLight.h:25
int number() const
Definition: NodeLight.h:58
inherits from class Rep
Definition: AppCanvas.cpp:18