WIP Undo / Redo: Serialization of the Model / ModelObject / Model instance

using the cereal framework.
This commit is contained in:
bubnikv 2019-06-26 16:29:12 +02:00
parent a710e7e7e4
commit d99e932ee8
7 changed files with 139 additions and 22 deletions

View file

@ -161,4 +161,15 @@ inline bool empty(const BoundingBox3Base<VT> &bb)
} // namespace Slic3r
#include <cereal/types/polymorphic.hpp>
#include <cereal/archives/binary.hpp>
// Serialization through the Cereal library
namespace cereal {
template<class Archive> void serialize(Archive& archive, Slic3r::BoundingBox &bb) { archive(bb.min, bb.max, bb.defined); }
template<class Archive> void serialize(Archive& archive, Slic3r::BoundingBox3 &bb) { archive(bb.min, bb.max, bb.defined); }
template<class Archive> void serialize(Archive& archive, Slic3r::BoundingBoxf &bb) { archive(bb.min, bb.max, bb.defined); }
template<class Archive> void serialize(Archive& archive, Slic3r::BoundingBoxf3 &bb) { archive(bb.min, bb.max, bb.defined); }
}
#endif