Manages the collection of lights.
More...
#include <LightManager.h>
Manages the collection of lights.
Is responsible for holding the information of the different lights and setting all the corresponding uniforms.
◆ LightManager()
| LightManager::LightManager |
( |
| ) |
|
◆ createDirectionalLight()
| void LightManager::createDirectionalLight |
( |
glm::vec3 |
color, |
|
|
glm::vec3 |
direction |
|
) |
| |
Creates a directional-light and adds it to the manager. See DirectionalLight.
- Parameters
-
| color | Color of the light. |
| direction | Direction of the light. |
◆ createPointLight()
| void LightManager::createPointLight |
( |
glm::vec3 |
color, |
|
|
glm::vec3 |
position, |
|
|
glm::vec3 |
attenuation |
|
) |
| |
Creates a point-light and adds it to the manager. See PointLight.
- Parameters
-
| color | Color of the light. |
| position | Position of the light. |
| attenuation | Attenuation coefficients of the light. |
◆ createSpotLight()
| void LightManager::createSpotLight |
( |
glm::vec3 |
color, |
|
|
glm::vec3 |
position, |
|
|
glm::vec3 |
direction, |
|
|
float |
innerOpeningAngle, |
|
|
float |
outerOpeningAngle, |
|
|
glm::vec3 |
attenuation |
|
) |
| |
Creates a spot-light and adds it to the manager. See SpotLight.
- Parameters
-
| color | Color of the light. |
| position | Position of the light. |
| direction | Direction of the light. |
| innerOpeningAngle | Inner angle in degrees. |
| outerOpeningAngle | Outer angle in degrees. |
| attenuation | Attenuation factors. |
◆ setUniforms()
| void LightManager::setUniforms |
( |
const std::vector< std::shared_ptr< Shader >> & |
shaders | ) |
|
Sets the light releted uniforms for all shaders in the vector.
- Parameters
-
| shaders | Vector of shaders for which the uniforms will be set. |
◆ maxDirectionalLights
| const int LightManager::maxDirectionalLights = 1 |
|
static |
Maximum number of directional-lights.
◆ maxPointLights
| const int LightManager::maxPointLights = 1 |
|
static |
Maximum number of point-lights.
◆ maxSpotLights
| const int LightManager::maxSpotLights = 1 |
|
static |
Maximum number of spot-lights.
The documentation for this class was generated from the following files: