6 #ifndef UTILS_SERIALIZABLES_H 7 #define UTILS_SERIALIZABLES_H 9 #include <cereal/cereal.hpp> 11 #include <glm/vec3.hpp> 12 #include <glm/gtc/quaternion.hpp> 22 friend class cereal::access;
30 glm::vec3 ToVec3()
const {
return glm::vec3(x, y, z); }
33 template <
class Archive>
34 void serialize(Archive &ar)
36 ar(CEREAL_NVP(x), CEREAL_NVP(y), CEREAL_NVP(z));
45 friend class cereal::access;
53 glm::quat ToQuat()
const {
return glm::quat(w, x, y, z); }
56 template <
class Archive>
57 void serialize(Archive &ar)
59 ar(CEREAL_NVP(x), CEREAL_NVP(y), CEREAL_NVP(z), CEREAL_NVP(w));
Serializable extension of glm::quat.
Definition: Serializables.h:43
Serializable extension of glm::vec3.
Definition: Serializables.h:20
General namespace for utilities.
Definition: BulletConversions.h:9