vengine  0.0.1
3D graphics engine
Loading...
Searching...
No Matches
Light.hpp
Go to the documentation of this file.
1///
2/// @file Light.hpp
3/// @brief This file contains the Light Factory class
4/// @namespace ven
5///
6
7#pragma once
8
9#include <memory>
10
12
13namespace ven {
14
15 static constexpr Transform3D DEFAULT_TRANSFORM = {.translation = {0.F, 0.F, 0.F}, .scale = {0.1F, 0.F, 0.F}, .rotation = {0.F, 0.F, 0.F}};
16
17 ///
18 /// @class LightFactory
19 /// @brief Class for light factory
20 /// @namespace ven
21 ///
23
24 public:
25
26 LightFactory() = delete;
27 ~LightFactory() = default;
28
29 LightFactory(const LightFactory&) = delete;
33
34 static std::unique_ptr<Light> create(const Transform3D &transform = DEFAULT_TRANSFORM, glm::vec4 color = DEFAULT_LIGHT_COLOR);
35 static std::unique_ptr<Light> duplicate(const Light &cpyLight) { return create(cpyLight.transform, cpyLight.color); }
36
37 private:
38
39 static unsigned int m_currentLightId;
40
41 }; // class LightFactory
42
43} // namespace ven
This file contains the Light class.
Class for light factory.
Definition Light.hpp:22
static std::unique_ptr< Light > duplicate(const Light &cpyLight)
Definition Light.hpp:35
static unsigned int m_currentLightId
Definition Light.hpp:39
LightFactory()=delete
LightFactory & operator=(LightFactory &&)=delete
LightFactory(const LightFactory &)=delete
LightFactory(LightFactory &&)=delete
LightFactory & operator=(const LightFactory &)=delete
~LightFactory()=default
static std::unique_ptr< Light > create(const Transform3D &transform=DEFAULT_TRANSFORM, glm::vec4 color=DEFAULT_LIGHT_COLOR)
Definition Light.cpp:5
Class for light.
Definition Light.hpp:28
glm::vec4 color
Definition Light.hpp:50
Transform3D transform
Definition Light.hpp:51
Class for 3D transformation.
glm::vec3 translation
static constexpr Transform3D DEFAULT_TRANSFORM
Definition Light.hpp:15
static constexpr glm::vec4 DEFAULT_LIGHT_COLOR
Definition Light.hpp:19