Component to store light data. A light is an emitting mesh, rendered or not, that for each ogl::ShaderProgram used in the scene, its data will be sent to the shader.
More...
#include <Component.hpp>
|
glm::vec3 | color {1, 1, 1} |
| light color, default white
|
float | intensity = 1.f |
| light intensity
|
LightType | type = LightType::LIGHT_DIRECTIONAL |
| Light type for shader programs. This member is mainly used to create shader data blocks.
|
LightVectors | vectors {} |
| Light components vectors.
|
glm::vec3 | direction {1, -1, -1} |
| light direction
|
glm::vec3 | position {} |
| light position
|
LightConstraint | attenuation {} |
| light attenuation
|
float | cutOff = 12.5f |
| light cutoff
|
float | outerCutoff = 17.5f |
| light outer cutoff
|
bool | caster = true |
| light caster
|
Component to store light data. A light is an emitting mesh, rendered or not, that for each ogl::ShaderProgram used in the scene, its data will be sent to the shader.
◆ LightComponent() [1/3]
LightComponent::LightComponent |
( |
const glm::vec3 & | direction | ) |
|
|
inline |
Instances a directional light with the given direction.
- Parameters
-
◆ LightComponent() [2/3]
LightComponent::LightComponent |
( |
const glm::vec3 & | position, |
|
|
const LightConstraint & | constraint ) |
|
inline |
Instances a point light with the given position and LightConstraint.
- Parameters
-
position | light position |
constraint | light attenuation parameter |
- See also
- LightConstraint
◆ LightComponent() [3/3]
LightComponent::LightComponent |
( |
const glm::vec3 & | position, |
|
|
const glm::vec3 & | direction, |
|
|
const LightConstraint & | constraint, |
|
|
const float & | cutOff = 12.5f, |
|
|
const float & | outerCutoff = 17.5f ) |
|
inline |
Instances a spot light with the given position, direction, LightConstraint, light cutoff and outer cutoof.
- Parameters
-
position | light position |
direction | light direction |
constraint | light attenuation parameter |
cutOff | light cutoff parameter |
outerCutoff | light outer cutoff parameter |
- See also
- LightConstraint
◆ type
LightType LightComponent::type = LightType::LIGHT_DIRECTIONAL |
Light type for shader programs. This member is mainly used to create shader data blocks.
- See also
- LightType
◆ vectors
The documentation for this class was generated from the following file: