3#include "scene/lights/Light.hpp"
4#include "scene/Animated.hpp"
5#include "scene/Object.hpp"
26 PointLight(
const glm::vec3 & worldPosition,
const glm::vec3 & color,
float radius);
36 void update(
double fullTime,
double frameTime)
override;
46 glm::vec3
sample(
const glm::vec3 &
position,
float & dist,
float & attenuation)
const override;
90 std::array<glm::mat4, 6>
_vps;
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 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
An omnidirectional punctual light, where light is radiating in all directions from a single point in ...
Definition: PointLight.hpp:15
std::array< glm::mat4, 6 > _vps
Light VP matrices for each face.
Definition: PointLight.hpp:90
void draw(LightRenderer &renderer) override
Definition: PointLight.cpp:12
float _radius
The attenuation radius.
Definition: PointLight.hpp:92
Animated< glm::vec3 > _lightPosition
Light position.
Definition: PointLight.hpp:91
const glm::vec3 & position() const
Definition: PointLight.hpp:71
const std::array< glm::mat4, 6 > & vpFaces()
Definition: PointLight.hpp:86
bool decode(const KeyValues ¶ms)
Definition: PointLight.cpp:89
float farPlane() const
Definition: PointLight.hpp:81
float radius() const
Definition: PointLight.hpp:76
KeyValues encode() const override
Definition: PointLight.cpp:101
void setScene(const BoundingBox &sceneBox) override
Definition: PointLight.cpp:25
void update(double fullTime, double frameTime) override
Definition: PointLight.cpp:16
glm::vec3 sample(const glm::vec3 &position, float &dist, float &attenuation) const override
Definition: PointLight.cpp:68
float _farPlane
The projection matrices far plane.
Definition: PointLight.hpp:93
Represent a key-values tuple.
Definition: Config.hpp:9