Hymn to Beauty
C++ 3D Engine
SpotLight.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "SuperComponent.hpp"
4#include <glm/glm.hpp>
5
6namespace Component {
8class SpotLight : public SuperComponent {
9 public:
11 SpotLight();
12
13 void Serialize(Json::Value& node, bool load) override;
14
16 glm::vec3 color = glm::vec3(1.0f, 1.0f, 1.0f);
17
19 float attenuation = 1.0f;
20
22 float intensity = 1.0f;
23
25 float coneAngle = 15.0f;
26
28 float distance = 1.0f;
29};
30} // namespace Component
Component describing a spot light.
Definition: SpotLight.hpp:8
float distance
Distance.
Definition: SpotLight.hpp:28
float coneAngle
Angle of the cone (in degrees).
Definition: SpotLight.hpp:25
glm::vec3 color
Color.
Definition: SpotLight.hpp:16
float intensity
Intensity.
Definition: SpotLight.hpp:22
void Serialize(Json::Value &node, bool load) override
Save or load component values to/from JSON.
Definition: SpotLight.cpp:9
SpotLight()
Create new spot light.
Definition: SpotLight.cpp:7
float attenuation
Attenuation.
Definition: SpotLight.hpp:19
Component which all components inherit.
Definition: SuperComponent.hpp:9
Definition: BoxShapeEditor.hpp:5