Lugdunum  0.1.0
Light.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <list>
4 #include <string>
5 #include <vector>
6 
9 #include <lug/Math/Constant.hpp>
10 #include <lug/Math/Vector.hpp>
11 
12 namespace lug {
13 namespace Graphics {
14 
15 class Renderer;
16 
17 namespace Builder {
18 
20 public:
21  explicit Light(Renderer& renderer);
22 
23  Light(const Light&) = delete;
24  Light(Light&&) = delete;
25 
26  Light& operator=(const Light&) = delete;
27  Light& operator=(Light&&) = delete;
28 
29  ~Light() = default;
30 
35  void setName(const std::string& name);
36 
37  void setType(Render::Light::Type type);
38  void setColor(const Math::Vec4f& color);
39  void setDirection(const Math::Vec3f& direction);
40  void setConstantAttenuation(float constantAttenuation);
41  void setDistance(float distance);
42  void setLinearAttenuation(float linearAttenuation);
43  void setQuadraticAttenuation(float quadraticAttenuation);
44  void setFalloffAngle(float falloffAngle);
45  void setFalloffExponent(float falloffExponent);
46 
48 
49 protected:
51 
52  std::string _name;
53 
55 
56  Math::Vec4f _color{0.0f, 0.0f, 0.0f, 1.0f};
57  Math::Vec3f _direction{0.0f, 0.0f, 0.0f};
58  float _constantAttenuation{0.0f};
59  float _distance{0.0f};
60  float _linearAttenuation{1.0f};
61  float _quadraticAttenuation{1.0f};
62  float _falloffAngle{Math::halfPi<float>()};
63  float _falloffExponent{0.0f};
64 };
65 
67 
68 } // Builder
69 } // Graphics
70 } // lug
#define LUG_GRAPHICS_API
Definition: Export.hpp:11
Dummy class for a shared pointer.
Definition: Resource.hpp:66
Resource::SharedPtr< lug::Graphics::Render::Material > build(const ::lug::Graphics::Builder::Material &builder)
Definition: Material.cpp:14