2021-06-29 01:49:21 +00:00
|
|
|
#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;
|
2022-06-16 22:28:44 +00:00
|
|
|
struct AgentBounds;
|
2021-06-29 01:49:21 +00:00
|
|
|
|
|
|
|
constexpr char recastMeshMagic[] = { 'r', 'c', 's', 't' };
|
2022-06-16 22:28:44 +00:00
|
|
|
constexpr std::uint32_t recastMeshVersion = 2;
|
2021-06-29 01:49:21 +00:00
|
|
|
|
|
|
|
constexpr char preparedNavMeshDataMagic[] = { 'p', 'n', 'a', 'v' };
|
|
|
|
constexpr std::uint32_t preparedNavMeshDataVersion = 1;
|
|
|
|
|
2022-06-16 22:28:44 +00:00
|
|
|
std::vector<std::byte> serialize(const RecastSettings& settings, const AgentBounds& agentBounds,
|
|
|
|
const RecastMesh& recastMesh, const std::vector<DbRefGeometryObject>& dbRefGeometryObjects);
|
2021-06-29 01:49:21 +00:00
|
|
|
|
|
|
|
std::vector<std::byte> serialize(const PreparedNavMeshData& value);
|
2021-07-09 20:51:42 +00:00
|
|
|
|
|
|
|
bool deserialize(const std::vector<std::byte>& data, PreparedNavMeshData& value);
|
2021-06-29 01:49:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|