3#include "pixelbullet/serialization/glm_node.h"
10 glm::vec3 color = glm::vec3(1.0f);
11 float intensity = 1.0f;
13 float inner_cone_angle_degrees = 0.0f;
14 float outer_cone_angle_degrees = 45.0f;
19 node[
"enabled"] << light.enabled;
20 node[
"color"] << light.color;
21 node[
"intensity"] << light.intensity;
22 node[
"range"] << light.range;
23 node[
"innerConeAngleDegrees"] << light.inner_cone_angle_degrees;
24 node[
"outerConeAngleDegrees"] << light.outer_cone_angle_degrees;
28inline const Node& operator>>(
const Node& node, SpotLightComponent& light)
30 node[
"enabled"] >> light.enabled;
31 node[
"color"] >> light.color;
32 node[
"intensity"] >> light.intensity;
33 node[
"range"] >> light.range;
34 if (node.HasProperty(
"innerConeAngleDegrees"))
36 node[
"innerConeAngleDegrees"] >> light.inner_cone_angle_degrees;
38 if (node.HasProperty(
"outerConeAngleDegrees"))
40 node[
"outerConeAngleDegrees"] >> light.outer_cone_angle_degrees;
Represents a hierarchical node capable of storing various data types and supporting YAML serializatio...
Definition node.h:45
Definition spot_light_component.h:8