add support to SDLBackend for rendering 24bit data
[openc2e.git] / ser / s_physics.h
blobda9a821d4ae7dd20d043e2a385c23b3120b71a0b
1 /*
2 * s_physics.h
3 * openc2e
5 * Created by Bryan Donlan on Sun 21 May 2006
6 * Copyright (c) 2006 Bryan Donlan. All rights reserved.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
20 #ifndef S_PHYSICS_H
21 #define S_PHYSICS_H 1
23 #include "physics.h"
24 #include "serialization.h"
26 SERIALIZE(Point) {
27 ar & obj.x & obj.y;
30 BOOST_CLASS_IMPLEMENTATION(Point, boost::serialization::object_serializable);
31 BOOST_CLASS_TRACKING(Point, boost::serialization::track_never);
32 SAVE(Line) {
33 ar & obj.start & obj.end;
36 LOAD(Line) {
37 Point start, end;
38 ar & start & end;
39 obj = Line(start, end);
41 BOOST_CLASS_IMPLEMENTATION(Line, boost::serialization::object_serializable);
42 BOOST_CLASS_TRACKING(Line, boost::serialization::track_never);
44 SERIALIZE(Vector<float>) {
45 ar & obj.x & obj.y;
48 SERIALIZE(Vector<double>) {
49 ar & obj.x & obj.y;
51 BOOST_CLASS_IMPLEMENTATION(Vector<float>, boost::serialization::object_serializable);
52 BOOST_CLASS_TRACKING(Vector<float>, boost::serialization::track_never);
53 BOOST_CLASS_IMPLEMENTATION(Vector<double>, boost::serialization::object_serializable);
54 BOOST_CLASS_TRACKING(Vector<double>, boost::serialization::track_never);
58 #endif