From d3a74d7826b7a49c292924a8c7e351bccc9da99f Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Mon, 3 Nov 2014 17:35:18 +0200 Subject: [PATCH] interface/urho3d_cereal.h: Vector3 --- src/interface/urho3d_cereal.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/interface/urho3d_cereal.h b/src/interface/urho3d_cereal.h index 6ef73e4..f8354db 100644 --- a/src/interface/urho3d_cereal.h +++ b/src/interface/urho3d_cereal.h @@ -4,6 +4,7 @@ #include "core/types.h" #include #include +#include #include namespace cereal @@ -22,5 +23,21 @@ namespace cereal v.x_ = x; v.y_ = y; } + template + void save(Archive &archive, const Urho3D::Vector3 &v) + { + archive((double)v.x_); + archive((double)v.y_); + archive((double)v.z_); + } + template + void load(Archive &archive, Urho3D::Vector3 &v) + { + double x, y, z; + archive(x, y, z); + v.x_ = x; + v.y_ = y; + v.z_ = z; + } } // vim: set noet ts=4 sw=4: