Hymn to Beauty
C++ 3D Engine
PointLight.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 PointLight : public SuperComponent {
9 public:
11 PointLight();
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 distance = 1.0f;
26};
27} // namespace Component
Component describing a point light.
Definition: PointLight.hpp:8
glm::vec3 color
Color.
Definition: PointLight.hpp:16
float intensity
Intensity.
Definition: PointLight.hpp:22
void Serialize(Json::Value &node, bool load) override
Save or load component values to/from JSON.
Definition: PointLight.cpp:9
PointLight()
Create new point light.
Definition: PointLight.cpp:7
float attenuation
Attenuation.
Definition: PointLight.hpp:19
float distance
Distance.
Definition: PointLight.hpp:25
Component which all components inherit.
Definition: SuperComponent.hpp:9
Definition: BoxShapeEditor.hpp:5