2018-09-30 22:33:25 +00:00
|
|
|
#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_NAVMESHDATA_H
|
|
|
|
#define OPENMW_COMPONENTS_DETOURNAVIGATOR_NAVMESHDATA_H
|
|
|
|
|
|
|
|
#include <DetourAlloc.h>
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
namespace DetourNavigator
|
|
|
|
{
|
|
|
|
struct NavMeshDataValueDeleter
|
|
|
|
{
|
|
|
|
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;
|
2018-09-30 22:33:25 +00:00
|
|
|
|
|
|
|
NavMeshData() = default;
|
|
|
|
|
|
|
|
NavMeshData(unsigned char* value, int size)
|
|
|
|
: mValue(value)
|
|
|
|
, mSize(size)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|