1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-05 15:55:45 +00:00
OpenMW/components/detournavigator/navmeshdata.hpp

33 lines
656 B
C++
Raw Normal View History

#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_NAVMESHDATA_H
#define OPENMW_COMPONENTS_DETOURNAVIGATOR_NAVMESHDATA_H
#include <DetourAlloc.h>
#include <memory>
namespace DetourNavigator
{
struct NavMeshDataValueDeleter
{
2022-09-22 18:26:05 +00:00
void operator()(unsigned char* value) const { dtFree(value); }
};
using NavMeshDataValue = std::unique_ptr<unsigned char, NavMeshDataValueDeleter>;
struct NavMeshData
{
NavMeshDataValue mValue;
2021-07-01 17:00:22 +00:00
int mSize = 0;
NavMeshData() = default;
NavMeshData(unsigned char* value, int size)
: mValue(value)
, mSize(size)
2022-09-22 18:26:05 +00:00
{
}
};
}
#endif