CG-Project2
Loading...
Searching...
No Matches
systems::light Namespace Reference

All utilities for lights and shader data. More...

Functions

LightShaderBlock getLightInfo (const unsigned int &id)
 Retrieves a block (struct data) that will be sent to a shader program. The block will contain all the light data.
void updateColor (const unsigned int &id, const glm::vec3 &color)
 Updates the light color vector.
void updateIntensity (const unsigned int &id, const float &intensity)
 Updates the light intensity value.
void updateAmbient (const unsigned int &id, const glm::vec3 &ambient)
 Updates the light ambient vector.
void updateDiffuse (const unsigned int &id, const glm::vec3 &diffuse)
 Updates the light diffuse vector.
void updateSpecular (const unsigned int &id, const glm::vec3 &specular)
 Updates the light specular vector.
void updateDirection (const unsigned int &id, const glm::vec3 &direction)
 Updates the light direction vector.
void updatePosition (const unsigned int &id, const glm::vec3 &position)
 Updates the light position vector.
void updateConstant (const unsigned int &id, const float &constant)
 Updates the light constant value.
void updateLinear (const unsigned int &id, const float &linear)
 Updates the light linear value.
void updateQuadratic (const unsigned int &id, const float &quadratic)
 Updates the light quadratic value.
void updateCutoff (const unsigned int &id, const float &cutoff)
 Updates the light cutoff value.
void updateOuterCutoff (const unsigned int &id, const float &outerCutoff)
 Updates the light outer cutoff value.
void setLightComputation (const unsigned int &id, const LightComputation &comp)
 Updates the light computaion of an entity.
LightComputation getLightComputation (const unsigned int &id)
 Retrieves the light computation of an entity.

Detailed Description

All utilities for lights and shader data.

Function Documentation

◆ getLightComputation()

LightComputation systems::light::getLightComputation ( const unsigned int & id)

Retrieves the light computation of an entity.

Parameters
idthe entity id
Returns
the light computation

◆ getLightInfo()

LightShaderBlock systems::light::getLightInfo ( const unsigned int & id)

Retrieves a block (struct data) that will be sent to a shader program. The block will contain all the light data.

Parameters
idthe light id
Returns
a data block for shader programs

◆ setLightComputation()

void systems::light::setLightComputation ( const unsigned int & id,
const LightComputation & comp )

Updates the light computaion of an entity.

Parameters
idthe light id
compthe new entity light computation

◆ updateAmbient()

void systems::light::updateAmbient ( const unsigned int & id,
const glm::vec3 & ambient )

Updates the light ambient vector.

Parameters
idthe light id
ambientthe light new ambient

◆ updateColor()

void systems::light::updateColor ( const unsigned int & id,
const glm::vec3 & color )

Updates the light color vector.

Parameters
idthe light id
colorthe light new color

◆ updateConstant()

void systems::light::updateConstant ( const unsigned int & id,
const float & constant )

Updates the light constant value.

Parameters
idthe light id
constantthe light new constant

◆ updateCutoff()

void systems::light::updateCutoff ( const unsigned int & id,
const float & cutoff )

Updates the light cutoff value.

Parameters
idthe light id
cutoffthe light new cutoff

◆ updateDiffuse()

void systems::light::updateDiffuse ( const unsigned int & id,
const glm::vec3 & diffuse )

Updates the light diffuse vector.

Parameters
idthe light id
diffusethe light new diffuse

◆ updateDirection()

void systems::light::updateDirection ( const unsigned int & id,
const glm::vec3 & direction )

Updates the light direction vector.

Parameters
idthe light id
directionthe light new direction

◆ updateIntensity()

void systems::light::updateIntensity ( const unsigned int & id,
const float & intensity )

Updates the light intensity value.

Parameters
idthe light id
intensitythe light new intensity

◆ updateLinear()

void systems::light::updateLinear ( const unsigned int & id,
const float & linear )

Updates the light linear value.

Parameters
idthe light id
linearthe light new linear

◆ updateOuterCutoff()

void systems::light::updateOuterCutoff ( const unsigned int & id,
const float & outerCutoff )

Updates the light outer cutoff value.

Parameters
idthe light id
outerCutoffthe light new outer cutoff

◆ updatePosition()

void systems::light::updatePosition ( const unsigned int & id,
const glm::vec3 & position )

Updates the light position vector.

Parameters
idthe light id
positionthe light new position

◆ updateQuadratic()

void systems::light::updateQuadratic ( const unsigned int & id,
const float & quadratic )

Updates the light quadratic value.

Parameters
idthe light id
quadraticthe light new quadratic

◆ updateSpecular()

void systems::light::updateSpecular ( const unsigned int & id,
const glm::vec3 & specular )

Updates the light specular vector.

Parameters
idthe light id
specularthe light new specular