|
CeresEngine 0.2.0
A game development framework
|
A scene light. More...
#include <CeresEngine/Scene/Light.hpp>
Classes | |
| struct | Accessor |
| A scene light. More... | |
Public Member Functions | |
| virtual CE_DISABLE_WARNING_MISSING_OVERRIDE ::CeresEngine::ClassInfo | getClassInfo () const noexcept |
| virtual ::CeresEngine::ClassInfo | getClassInfo () noexcept |
| LightComponent ()=default | |
Creates a new LightComponent with the default values. | |
Public Member Functions inherited from CeresEngine::Component< LightComponent > | |
| const ComponentType & | getComponentType () const noexcept final |
| Gets the component type. | |
Public Member Functions inherited from CeresEngine::AbstractComponent | |
| virtual | ~AbstractComponent ()=default |
| Defaulted virtual destructor. | |
Static Public Member Functions | |
| template<typename Processor > | |
| static constexpr void | reflect (Processor &&RTTI) |
| Executes the given processor for every field of the struct. | |
Public Attributes | |
| LightType | type = LightType::Point |
| The light type. | |
| Vector3 | color = Vector3(1.0) |
| The light ambient color. | |
| double | power = 1.0 |
| Power of the light in Watts. | |
| double | radius = 1.0 |
| When larger than zero, light will be emitted from a spherical surfaces with the specified radius. | |
| double | strength = 1.0 |
| The light strength. | |
| bool | shouldCastShadows = false |
| A flag that indicates if the light should cast shadows. | |
| double | shadowOcclusionStrength = 1.0 |
| A constant that control the shadow occlusion strength. | |
| double | constant = 0.0 |
| The point light constant attenuation constant. | |
| double | linear = 0.0 |
| The point light linear attenuation constant. | |
| double | quadratic = 1.0 |
| The point light quadratic attenuation constant. | |
| double | cutOff = 10.0 |
| The spot light cutoff angle. | |
| double | outerCutOff = 15.0 |
| The spot light outer cutoff angle. | |
| RendererLightSettings | rendererSettings |
| A set of settings that should be used by renderer when rendering the light. | |
Additional Inherited Members | |
Static Public Attributes inherited from CeresEngine::Component< LightComponent > | |
| static const ComponentID | componentID |
| This component type ID. | |
| static const ComponentMask | mask |
| The component mask. | |
| static const ComponentType & | componentType |
| Gets the component type. | |
A scene light.
The power of sun lights is specified in Watts per square meter. The power of point lights, spot lights, and area lights is specified in Watts. But this is not the electrical Watts that consumer light bulbs are rated at. It is Radiant Flux or Radiant Power which is also measured in Watts. It is the energy radiated from the light in the form of visible light.
If you want to set the power to real world values, you have to convert the wattage of consumer bulbs or LED lights to radiant flux, but it is not a straightforward process. The wattage of bulbs means the electrical power required to power them. LED lights have a “Watt equivalent” which is neither the electrical power they require nor the amount of light they put out. Some consumer lights specify lumens or luminous flux which is the radiant flux weighted with the wavelengths perceived by the human eye.
|
default |
Creates a new LightComponent with the default values.
|
virtualnoexcept |
Reimplemented from CeresEngine::AbstractComponent.
|
virtualnoexcept |
Reimplemented from CeresEngine::AbstractComponent.
|
inlinestaticconstexpr |
Executes the given processor for every field of the struct.
| RTTI | The processor to be ran for every field. |
| double CeresEngine::LightComponent::constant = 0.0 |
The point light constant attenuation constant.
| double CeresEngine::LightComponent::cutOff = 10.0 |
The spot light cutoff angle.
| double CeresEngine::LightComponent::linear = 0.0 |
The point light linear attenuation constant.
| double CeresEngine::LightComponent::outerCutOff = 15.0 |
The spot light outer cutoff angle.
| double CeresEngine::LightComponent::power = 1.0 |
Power of the light in Watts.
Higher values increase the intensity of the light. Negative values can be set, but should be avoided for predictable and physically based result.
| double CeresEngine::LightComponent::quadratic = 1.0 |
The point light quadratic attenuation constant.
| double CeresEngine::LightComponent::radius = 1.0 |
When larger than zero, light will be emitted from a spherical surfaces with the specified radius.
Lights with larger size have softer shadows and specular highlights, and they will also appear dimmer because their power is distributed over a larger area.
| RendererLightSettings CeresEngine::LightComponent::rendererSettings |
A set of settings that should be used by renderer when rendering the light.
| double CeresEngine::LightComponent::shadowOcclusionStrength = 1.0 |
A constant that control the shadow occlusion strength.
A flag that indicates if the light should cast shadows.
| double CeresEngine::LightComponent::strength = 1.0 |
The light strength.
| LightType CeresEngine::LightComponent::type = LightType::Point |
The light type.