Molecular Vis
Improving perception of molecular visualization
PointLight Class Reference

Class for point-lights. More...

#include <PointLight.h>

Inheritance diagram for PointLight:
Light

Public Member Functions

 PointLight (glm::vec3 color, glm::vec3 position, glm::vec3 attenuation)
 
- Public Member Functions inherited from Light
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

Class for point-lights.

Constructor & Destructor Documentation

◆ PointLight()

PointLight::PointLight ( glm::vec3  color,
glm::vec3  position,
glm::vec3  attenuation 
)

Creates a point-light.

Parameters
colorColor of the light.
positionPosition of the light.
attenuationAttenuation coefficients of the light.ss

Member Function Documentation

◆ setUniform()

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

Sets the point-light related uniforms in a shader. Sets following uniforms: pointLights[index].color pointLights[index].position pointLights[index].attenuation

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

Reimplemented from Light.


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