Molecular Vis
Improving perception of molecular visualization
|
Class for spot-lights. More...
#include <SpotLight.h>
Public Member Functions | |
SpotLight (glm::vec3 color, glm::vec3 position, glm::vec3 direction, float innerOpeningAngle, float outerOpeningAngle, glm::vec3 attenuation) | |
![]() | |
virtual void | setUniforms (const std::vector< std::shared_ptr< Shader >> &shaders, int index) final |
Protected Member Functions | |
virtual void | setUniform (std::shared_ptr< Shader > &shader, int index) |
Class for spot-lights.
SpotLight::SpotLight | ( | glm::vec3 | color, |
glm::vec3 | position, | ||
glm::vec3 | direction, | ||
float | innerOpeningAngle, | ||
float | outerOpeningAngle, | ||
glm::vec3 | attenuation | ||
) |
Creates a spot-light.
color | Color of the light. |
position | Position of the light. |
direction | Direction of the light. |
innerOpeningAngle | Inner opening angle of the light in degrees. |
outerOpeningAngle | Outer opening angle of the light in degrees. |
attenuation | Attenuation coefficients of the light. |
|
protectedvirtual |
Sets the spot-light related uniforms in a shader. Sets following uniforms: spotLights[index].color spotLights[index].position spotLights[index].attenuation spotLights[index].direction spotLights[index].innerOpeningAngle spotLights[index].outerOpeningAngle
shader | Shader to be updated |
index | index of the light among lights of the same type (used in shader to index light) |
Reimplemented from Light.