vengine  0.0.1
3D graphics engine
Loading...
Searching...
No Matches
Light.cpp
Go to the documentation of this file.
2
4
5std::unique_ptr<ven::Light> ven::LightFactory::create(const Transform3D &transform, const glm::vec4 color)
6{
7 assert(m_currentLightId < MAX_LIGHTS && "Max light count exceeded!");
8 auto light = std::make_unique<Light>(++m_currentLightId);
9 light->color = color;
10 light->transform = transform;
11 return light;
12}
This file contains the Light Factory class.
static unsigned int m_currentLightId
Definition Light.hpp:39
static std::unique_ptr< Light > create(const Transform3D &transform=DEFAULT_TRANSFORM, glm::vec4 color=DEFAULT_LIGHT_COLOR)
Definition Light.cpp:5
Class for 3D transformation.
static constexpr uint8_t MAX_LIGHTS
Definition Light.hpp:21