Blender V4.3
NodeLight.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 "Node.h"
13
14#include "../geometry/Geom.h"
15
17
18namespace Freestyle {
19
20using namespace Geometry;
21
22class NodeLight : public Node {
23 public:
24 NodeLight();
25 NodeLight(NodeLight &iBrother);
26
27 virtual ~NodeLight() {}
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 */
Configuration definitions.
Vectors and Matrices (useful type definitions)
Abstract class for scene graph nodes. Inherits from BaseObject which defines the addRef release mecha...
ATTR_WARN_UNUSED_RESULT const BMVert * v
const float * specular() const
Definition NodeLight.h:43
const float * ambient() const
Definition NodeLight.h:33
virtual void accept(SceneVisitor &v)
Definition NodeLight.cpp:60
const float * diffuse() const
Definition NodeLight.h:38
const float * position() const
Definition NodeLight.h:48
bool isOn() const
Definition NodeLight.h:53
virtual ~NodeLight()
Definition NodeLight.h:27
int number() const
Definition NodeLight.h:58
inherits from class Rep
Definition AppCanvas.cpp:20