RavEngine
Loading...
Searching...
No Matches
math_archive.h
1//----------------------------------------------------------------------------//
2// //
3// ozz-animation is hosted at http://github.com/guillaumeblanc/ozz-animation //
4// and distributed under the MIT License (MIT). //
5// //
6// Copyright (c) Guillaume Blanc //
7// //
8// Permission is hereby granted, free of charge, to any person obtaining a //
9// copy of this software and associated documentation files (the "Software"), //
10// to deal in the Software without restriction, including without limitation //
11// the rights to use, copy, modify, merge, publish, distribute, sublicense, //
12// and/or sell copies of the Software, and to permit persons to whom the //
13// Software is furnished to do so, subject to the following conditions: //
14// //
15// The above copyright notice and this permission notice shall be included in //
16// all copies or substantial portions of the Software. //
17// //
18// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR //
19// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, //
20// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL //
21// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER //
22// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING //
23// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER //
24// DEALINGS IN THE SOFTWARE. //
25// //
26//----------------------------------------------------------------------------//
27
28#ifndef OZZ_OZZ_BASE_MATHS_MATH_ARCHIVE_H_
29#define OZZ_OZZ_BASE_MATHS_MATH_ARCHIVE_H_
30
31#include "ozz/base/io/archive_traits.h"
32#include "ozz/base/platform.h"
33
34namespace ozz {
35namespace math {
36struct Float2;
37struct Float3;
38struct Float4;
39struct Quaternion;
40struct Transform;
41struct Box;
42struct RectFloat;
43struct RectInt;
44} // namespace math
45namespace io {
46OZZ_IO_TYPE_NOT_VERSIONABLE(math::Float2)
47template <>
48struct OZZ_BASE_DLL Extern<math::Float2> {
49 static void Save(OArchive& _archive, const math::Float2* _values,
50 size_t _count);
51 static void Load(IArchive& _archive, math::Float2* _values, size_t _count,
52 uint32_t _version);
53};
54
55OZZ_IO_TYPE_NOT_VERSIONABLE(math::Float3)
56template <>
57struct OZZ_BASE_DLL Extern<math::Float3> {
58 static void Save(OArchive& _archive, const math::Float3* _values,
59 size_t _count);
60 static void Load(IArchive& _archive, math::Float3* _values, size_t _count,
61 uint32_t _version);
62};
63
64OZZ_IO_TYPE_NOT_VERSIONABLE(math::Float4)
65template <>
66struct OZZ_BASE_DLL Extern<math::Float4> {
67 static void Save(OArchive& _archive, const math::Float4* _values,
68 size_t _count);
69 static void Load(IArchive& _archive, math::Float4* _values, size_t _count,
70 uint32_t _version);
71};
72
73OZZ_IO_TYPE_NOT_VERSIONABLE(math::Quaternion)
74template <>
75struct OZZ_BASE_DLL Extern<math::Quaternion> {
76 static void Save(OArchive& _archive, const math::Quaternion* _values,
77 size_t _count);
78 static void Load(IArchive& _archive, math::Quaternion* _values, size_t _count,
79 uint32_t _version);
80};
81
82OZZ_IO_TYPE_NOT_VERSIONABLE(math::Transform)
83template <>
84struct OZZ_BASE_DLL Extern<math::Transform> {
85 static void Save(OArchive& _archive, const math::Transform* _values,
86 size_t _count);
87 static void Load(IArchive& _archive, math::Transform* _values, size_t _count,
88 uint32_t _version);
89};
90
91OZZ_IO_TYPE_NOT_VERSIONABLE(math::Box)
92template <>
93struct OZZ_BASE_DLL Extern<math::Box> {
94 static void Save(OArchive& _archive, const math::Box* _values, size_t _count);
95 static void Load(IArchive& _archive, math::Box* _values, size_t _count,
96 uint32_t _version);
97};
98
99OZZ_IO_TYPE_NOT_VERSIONABLE(math::RectFloat)
100template <>
101struct OZZ_BASE_DLL Extern<math::RectFloat> {
102 static void Save(OArchive& _archive, const math::RectFloat* _values,
103 size_t _count);
104 static void Load(IArchive& _archive, math::RectFloat* _values, size_t _count,
105 uint32_t _version);
106};
107
108OZZ_IO_TYPE_NOT_VERSIONABLE(math::RectInt)
109template <>
110struct OZZ_BASE_DLL Extern<math::RectInt> {
111 static void Save(OArchive& _archive, const math::RectInt* _values,
112 size_t _count);
113 static void Load(IArchive& _archive, math::RectInt* _values, size_t _count,
114 uint32_t _version);
115};
116} // namespace io
117} // namespace ozz
118#endif // OZZ_OZZ_BASE_MATHS_MATH_ARCHIVE_H_
Definition archive.h:174
Definition archive.h:105
Definition archive.h:271
Definition box.h:42
Definition vec_float.h:41
Definition vec_float.h:67
Definition vec_float.h:99
Definition quaternion.h:41
Definition rect.h:70
Definition rect.h:38
Definition transform.h:40