1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2024-12-29 12:20:41 +00:00
OpenMW/components/detournavigator/serialization.hpp

31 lines
960 B
C++
Raw Normal View History

#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_SERIALIZATION_H
#define OPENMW_COMPONENTS_DETOURNAVIGATOR_SERIALIZATION_H
#include <cstddef>
#include <cstdint>
#include <vector>
namespace DetourNavigator
{
class RecastMesh;
struct DbRefGeometryObject;
struct PreparedNavMeshData;
struct RecastSettings;
struct AgentBounds;
2022-09-22 18:26:05 +00:00
constexpr char recastMeshMagic[] = { 'r', 'c', 's', 't' };
constexpr std::uint32_t recastMeshVersion = 2;
2022-09-22 18:26:05 +00:00
constexpr char preparedNavMeshDataMagic[] = { 'p', 'n', 'a', 'v' };
constexpr std::uint32_t preparedNavMeshDataVersion = 1;
std::vector<std::byte> serialize(const RecastSettings& settings, const AgentBounds& agentBounds,
const RecastMesh& recastMesh, const std::vector<DbRefGeometryObject>& dbRefGeometryObjects);
std::vector<std::byte> serialize(const PreparedNavMeshData& value);
bool deserialize(const std::vector<std::byte>& data, PreparedNavMeshData& value);
}
#endif