|
StevEngine
StevEngine is a customizable C++ game engine.
|
Base class for light components. More...
#include <visuals/Lights.hpp>
Public Member Functions | |
| virtual void | UpdateShader (const Renderer::ShaderProgram &program) const =0 |
| Update shader uniforms for this light. | |
| virtual void | ResetShader (const Renderer::ShaderProgram &program) const =0 |
| Reset shader uniforms for this light. | |
| uint32_t | GetShaderLightID () const |
| Get shader light ID. | |
Public Member Functions inherited from StevEngine::Component | |
| Component () | |
| Create new component. | |
| virtual | ~Component () |
| Clean up component resources. | |
| GameObject & | GetParent () const |
| Get parent GameObject. | |
| Scene & | GetScene () const |
| Get containing Scene. | |
| virtual std::string | GetType () const =0 |
| Get component type. | |
| virtual Utilities::Stream | Export (Utilities::StreamType stream) const |
| Serialize component to a stream. | |
| virtual void | Start () |
| Initialize component after creation. | |
| virtual void | Deactivate () |
| Clean up when component is deactivated. | |
| virtual void | Update (double deltaTime) |
| Update component logic. | |
| virtual void | Draw (const Utilities::Matrix4 &transform) |
| Draw component visuals. | |
Public Attributes | |
| Utilities::Vector3 | diffuse |
| Diffuse light color. | |
| Utilities::Vector3 | specular |
| Specular light color. | |
Protected Member Functions | |
| Light (uint32_t shaderID, Utilities::Vector3 diffuse, Utilities::Vector3 specular, std::string type) | |
| Light (Utilities::Stream &stream, std::string type) | |
Protected Attributes | |
| const uint32_t | shaderLightID |
| Light index in shader. | |
Protected Attributes inherited from StevEngine::Component | |
| std::vector< std::pair< Utilities::ID, std::string > > | handlers |
| Event handler registrations. | |
Base class for light components.
Provides common functionality for different types of lights. Handles shader updates and light properties.
|
inline |
Get shader light ID.
|
pure virtual |
Reset shader uniforms for this light.
| program | Shader program to reset |
Implemented in StevEngine::Visuals::DirectionalLight, StevEngine::Visuals::PointLight, and StevEngine::Visuals::SpotLight.
|
pure virtual |
Update shader uniforms for this light.
| program | Shader program to update |
Implemented in StevEngine::Visuals::DirectionalLight, StevEngine::Visuals::PointLight, and StevEngine::Visuals::SpotLight.