3#include "scene/lights/Light.hpp"
4#include "scene/Animated.hpp"
5#include "scene/Object.hpp"
33 void update(
double fullTime,
double frameTime)
override;
43 glm::vec3
sample(
const glm::vec3 & position,
float & dist,
float & attenuation)
const override;
Wraps an animated property so that the initial value is preserved.
Definition: Animated.hpp:11
Represent the smallest axis-aligne box containing a given object or region of space.
Definition: Bounds.hpp:28
A directional light, where all light rays have the same direction.
Definition: DirectionalLight.hpp:13
Animated< glm::vec3 > _lightDirection
Light direction.
Definition: DirectionalLight.hpp:73
DirectionalLight()=default
glm::mat4 _viewMatrix
Light view matrix.
Definition: DirectionalLight.hpp:72
const glm::vec3 & direction() const
Definition: DirectionalLight.hpp:67
bool decode(const KeyValues ¶ms)
Definition: DirectionalLight.cpp:46
glm::vec3 sample(const glm::vec3 &position, float &dist, float &attenuation) const override
Definition: DirectionalLight.cpp:40
void update(double fullTime, double frameTime) override
Definition: DirectionalLight.cpp:13
void draw(LightRenderer &renderer) override
Definition: DirectionalLight.cpp:9
KeyValues encode() const override
Definition: DirectionalLight.cpp:61
glm::mat4 _projectionMatrix
Light projection matrix.
Definition: DirectionalLight.hpp:71
void setScene(const BoundingBox &sceneBox) override
Definition: DirectionalLight.cpp:22
A general light with adjustable color intensity, that can cast shadows.
Definition: Light.hpp:20
Base structure of a per-light specialized renderer.
Definition: LightRenderer.hpp:13
Represent a key-values tuple.
Definition: Config.hpp:9