3#include "pixelbullet/serialization/node.h"
9inline Node& operator<<(Node& node,
const glm::vec3& value)
11 node.SetType(NodeType::Array);
12 auto& properties = node.GetProperties();
21 properties.emplace_back(
"", std::move(x));
22 properties.emplace_back(
"", std::move(y));
23 properties.emplace_back(
"", std::move(z));
27inline void operator>>(
const Node& node, glm::vec3& value)
29 ASSERT(node.GetType() == NodeType::Array,
"Node is not an array");
30 const auto& properties = node.GetProperties();
31 ASSERT(properties.size() >= 3,
"Insufficient elements for glm::vec3");
32 properties[0].second >> value.x;
33 properties[1].second >> value.y;
34 properties[2].second >> value.z;
#define ASSERT(condition,...)
Asserts that a condition is true.
Definition assert.h:163