Math: Add serialization specialization for all types

Former-commit-id: 7e45c50d3b4eabfc581736f290fc208592d3d46c
This commit is contained in:
Lynix
2016-03-06 01:54:13 +01:00
parent d6a436100c
commit e9d126b3a4
28 changed files with 699 additions and 80 deletions

View File

@@ -430,6 +430,42 @@ namespace Nz
return orientedBox;
}
/*!
* \brief Serializes a OrientedBox
* \return true if successfully serialized
*
* \param context Serialization context
* \param obb Input oriented box
*
* \remark Does not save OBB corners
*/
template<typename T>
bool Serialize(SerializationContext& context, const OrientedBox<T>& obb)
{
if (!Serialize(context, obb.localBox))
return false;
return true;
}
/*!
* \brief Unserializes a Matrix4
* \return true if successfully unserialized
*
* \param context Serialization context
* \param obb Output oriented box
*
* \remark The resulting oriented box corners will *not* be updated, a call to Update is required
*/
template<typename T>
bool Unserialize(SerializationContext& context, OrientedBox<T>* obb)
{
if (!Unserialize(context, &obb->localBox))
return false;
return true;
}
}
/*!