Molecular Vis
Improving perception of molecular visualization
Light Class Reference

Base class for lights. More...

#include <Light.h>

Inheritance diagram for Light:
DirectionalLight PointLight SpotLight

Public Member Functions

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)
 

Detailed Description

Base class for lights.

Member Function Documentation

◆ setUniform()

void Light::setUniform ( std::shared_ptr< Shader > &  shader,
int  index 
)
protectedvirtual

Uniforms to update for a particular light and shader. Has to be overwritten.

Parameters
shadershader to be updated.
indexindex index of the light among lights of the same type (used in shader to index light)

Reimplemented in SpotLight, DirectionalLight, and PointLight.

◆ setUniforms()

void Light::setUniforms ( const std::vector< std::shared_ptr< Shader >> &  shaders,
int  index 
)
finalvirtual

Updates all light related uniform for all shaders in shaders-vector for this light. Internally calls void setUniform(std::shared_ptr<Shader>& shadeer, int index);

Parameters
shadersVectors of all shaders to be uodated.
indexindex of the light among lights of the same type (used in shader to index light)

The documentation for this class was generated from the following files: