Molecular Vis
Improving perception of molecular visualization
|
Class defining directional lights. More...
#include <DirectionalLight.h>
Public Member Functions | |
DirectionalLight (glm::vec3 color, glm::vec3 direction) | |
![]() | |
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 defining directional lights.
DirectionalLight::DirectionalLight | ( | glm::vec3 | color, |
glm::vec3 | direction | ||
) |
Creates directional light.
color | Color of the light. The r,g,b components should be between 0 and 1. |
direction | The direction of the light. This gets normalized. |
|
protectedvirtual |
Sets the directional light related uniforms in a shader. Sets following uniforms: "directionalLights[index].color" "directionalLights[index].direction"
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.