StevEngine
StevEngine is a customizable C++ game engine.
|
Directional light for parallel light rays. More...
#include <visuals/Lights.hpp>
Public Member Functions | |
DirectionalLight (Utilities::Vector3 diffuse=Utilities::Vector3(1.0), Utilities::Vector3 specular=Utilities::Vector3(1.0)) | |
Create directional light. | |
DirectionalLight (Utilities::Stream &stream) | |
Create directional light from text serialized data. | |
std::string | GetType () const |
Get component type. | |
Utilities::Stream | Export (Utilities::StreamType type) const |
Serialize component to a stream. | |
void | UpdateShader (const Renderer::ShaderProgram &program) const |
Update shader uniforms for this light. | |
void | ResetShader (const Renderer::ShaderProgram &program) const |
Reset shader uniforms for this light. | |
![]() | |
uint32_t | GetShaderLightID () const |
Get shader light ID. | |
![]() | |
Component () | |
Create new component. | |
virtual | ~Component () |
Clean up component resources. | |
GameObject & | GetParent () const |
Get parent GameObject. | |
Scene & | GetScene () const |
Get containing Scene. | |
virtual void | Start () |
Initialize component after creation. | |
Additional Inherited Members | |
![]() | |
Utilities::Vector3 | diffuse |
Diffuse light color. | |
Utilities::Vector3 | specular |
Specular light color. | |
![]() | |
Light (uint32_t shaderID, Utilities::Vector3 diffuse, Utilities::Vector3 specular, std::string type) | |
Light (Utilities::Stream &stream, std::string type) | |
![]() | |
const uint32_t | shaderLightID |
Light index in shader. | |
![]() | |
std::vector< std::pair< Utilities::ID, std::string > > | handlers |
Event handler registrations. | |
Directional light for parallel light rays.
Simulates light from an infinitely distant source like the sun. Direction matters but position does not affect lighting.
StevEngine::Visuals::DirectionalLight::DirectionalLight | ( | Utilities::Vector3 | diffuse = Utilities::Vector3(1.0), |
Utilities::Vector3 | specular = Utilities::Vector3(1.0) ) |
Create directional light.
diffuse | Diffuse light color |
specular | Specular light color |
StevEngine::Visuals::DirectionalLight::DirectionalLight | ( | Utilities::Stream & | stream | ) |
Create directional light from text serialized data.
stream | Stream containing serialized component data |
|
virtual |
Serialize component to a stream.
type | Type of stream to export to |
Implements StevEngine::Component.
|
inlinevirtual |
|
virtual |
Reset shader uniforms for this light.
program | Shader program to reset |
Implements StevEngine::Visuals::Light.
|
virtual |
Update shader uniforms for this light.
program | Shader program to update |
Implements StevEngine::Visuals::Light.