|
StevEngine
StevEngine is a customizable C++ game engine.
|
Spot light for cone-shaped directional lighting. More...
#include <visuals/Lights.hpp>
Public Member Functions | |
| SpotLight (Utilities::Vector3 diffuse=Utilities::Vector3(1.0), Utilities::Vector3 specular=Utilities::Vector3(1.0), float cutOff=12.5, float outerCutOff=17.5) | |
| Create spot light. | |
| SpotLight (Utilities::Stream &stream) | |
| Create spot 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. | |
Public Member Functions inherited from StevEngine::Visuals::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 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 | |
| float | cutOff |
| Inner cone angle in degrees. | |
| float | outerCutOff |
| Outer cone angle in degrees. | |
Public Attributes inherited from StevEngine::Visuals::Light | |
| Utilities::Vector3 | diffuse |
| Diffuse light color. | |
| Utilities::Vector3 | specular |
| Specular light color. | |
Additional Inherited Members | |
Protected Member Functions inherited from StevEngine::Visuals::Light | |
| Light (uint32_t shaderID, Utilities::Vector3 diffuse, Utilities::Vector3 specular, std::string type) | |
| Light (Utilities::Stream &stream, std::string type) | |
Protected Attributes inherited from StevEngine::Visuals::Light | |
| 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. | |
Spot light for cone-shaped directional lighting.
Light emanates in a cone from a point. Has inner and outer cone angles for smooth edges.
| StevEngine::Visuals::SpotLight::SpotLight | ( | Utilities::Vector3 | diffuse = Utilities::Vector3(1.0), |
| Utilities::Vector3 | specular = Utilities::Vector3(1.0), | ||
| float | cutOff = 12.5, | ||
| float | outerCutOff = 17.5 ) |
Create spot light.
| diffuse | Diffuse light color |
| specular | Specular light color |
| cutOff | Inner cone angle in degrees |
| outerCutOff | Outer cone angle in degrees |
| StevEngine::Visuals::SpotLight::SpotLight | ( | Utilities::Stream & | stream | ) |
Create spot light from text serialized data.
| stream | Stream containing serialized component data |
|
virtual |
Serialize component to a stream.
| type | Type of stream to export to |
Reimplemented from 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.