21#include <glm/vec3.hpp>
68 Vector3 color = Vector3(1.0);
83 double strength = 1.0;
87 bool shouldCastShadows = false;
91 double shadowOcclusionStrength = 1.0;
95 double constant = 0.0;
103 double quadratic = 1.0;
107 double cutOff = 10.0;
111 double outerCutOff = 15.0;
124 template<typename Processor> static constexpr
void reflect(Processor&& RTTI) {
154 Vector3 getColor() const noexcept;
158 void setColor(Vector3 color) noexcept;
162 double getStrength() const noexcept;
166 void setStrength(
double strength) noexcept;
170 bool getShouldCastShadows() const noexcept;
175 void setShouldCastShadows(
bool shouldCastShadows) noexcept;
179 double getShadowOcclusionStrength() const noexcept;
184 void setShadowOcclusionStrength(
double shadowOcclusionStrength) noexcept;
188 double getConstant() const noexcept;
192 void setConstant(
double constant) noexcept;
196 double getLinear() const noexcept;
200 void setLinear(
double linear) noexcept;
204 double getQuadratic() const noexcept;
208 void setQuadratic(
double quadratic) noexcept;
212 double getCutOff() const noexcept;
216 void setCutOff(
double cutOff) noexcept;
220 double getOuterCutOff() const noexcept;
224 void setOuterCutOff(
double outerCutOff) noexcept;
235 const ScopeExit commitSettings([&]() { setRendererSettings(settings); });
236 return func(settings);
242 template<
typename Processor>
static constexpr void reflect(Processor&& RTTI) {
247 CE_REFL_DATA_GETSET(shadowOcclusionStrength, getShadowOcclusionStrength, setShadowOcclusionStrength);
283 using TSceneObject::TSceneObject;
#define CE_EXTERN_COMPONENT(T)
Definition Component.hpp:600
#define CE_ENTITY_OBJECT_HASH(T)
Definition Entity.hpp:784
#define CE_REFLECT_HASH(T)
Definition Hash.hpp:89
#define CE_REFLECTABLE_STRUCT
Definition IReflectable.hpp:47
#define CE_REFL_DATA_GETSET(N, G, S)
Definition Macros.hpp:549
#define CE_REFL_DATA(N)
Definition Macros.hpp:541
#define CE_SCRIPT_EXPORT(...)
The CE_SCRIPT_EXPORT macro marks a class or method as exportable and available in scripting environme...
Definition Macros.hpp:247
The base entity class.
Definition Entity.hpp:41
Definition EntityManager.hpp:49
A scene light.
Definition Light.hpp:275
Light(EntityManager &entityManager, const Entity &parent, LightType type)
Create a new Light with the given type and parent.
The SceneObject template class is a helper class that EntityObjects might choose to use to provide so...
Definition SceneObject.hpp:323
Definition Concepts.hpp:43
Definition Application.hpp:19
CE_FLATTEN_INLINE Type getType()
Definition Type.hpp:248
LightType
Definition Light.hpp:25
@ Point
The point light is an omni-directional point of light, that is, a point radiating the same amount of ...
@ Spot
A spot light emits a cone-shaped beam of light from the tip of the cone, in a given direction.
@ Directional
A sun light provides light of constant intensity emitted in a single direction from infinitely far aw...
@ Area
The area light simulates light originating from a surface (or surface-like) emitter.
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Components serve as the base for data storage for an entity.
Definition Component.hpp:68
A scene light.
Definition Light.hpp:140
static constexpr void reflect(Processor &&RTTI)
Executes the given processor for every field of the struct.
Definition Light.hpp:242
A scene light.
Definition Light.hpp:58
A structure that holds renderer-specific settings for a Light.
Definition RendererLightSettings.hpp:150
Definition ScopeExit.hpp:15