PixelBullet  0.0.1
A C++ game engine
Loading...
Searching...
No Matches
point_light_component.h
1#pragma once
2
3#include "pixelbullet/serialization/glm_node.h"
4
5namespace pixelbullet
6{
8{
9 bool enabled = true;
10 glm::vec3 color = glm::vec3(1.0f);
11 float intensity = 1.0f;
12 float range = 5.0f;
13};
14
15inline Node& operator<<(Node& node, const PointLightComponent& light)
16{
17 node["enabled"] << light.enabled;
18 node["color"] << light.color;
19 node["intensity"] << light.intensity;
20 node["range"] << light.range;
21 return node;
22}
23
24inline const Node& operator>>(const Node& node, PointLightComponent& light)
25{
26 node["enabled"] >> light.enabled;
27 node["color"] >> light.color;
28 node["intensity"] >> light.intensity;
29 node["range"] >> light.range;
30 return node;
31}
32} // namespace pixelbullet
Represents a hierarchical node capable of storing various data types and supporting YAML serializatio...
Definition node.h:45
Definition point_light_component.h:8