2021-07-13 22:03:10 +00:00
|
|
|
#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_PREPAREDNAVMESHDATATUPLE_H
|
|
|
|
#define OPENMW_COMPONENTS_DETOURNAVIGATOR_PREPAREDNAVMESHDATATUPLE_H
|
|
|
|
|
|
|
|
#include "preparednavmeshdata.hpp"
|
|
|
|
#include "ref.hpp"
|
2021-07-26 18:18:01 +00:00
|
|
|
#include "recast.hpp"
|
2021-07-13 22:03:10 +00:00
|
|
|
|
|
|
|
#include <Recast.h>
|
|
|
|
|
|
|
|
#include <tuple>
|
|
|
|
|
|
|
|
namespace DetourNavigator
|
|
|
|
{
|
|
|
|
constexpr auto makeTuple(const rcPolyMesh& v) noexcept
|
|
|
|
{
|
|
|
|
return std::tuple(
|
2021-07-26 18:18:01 +00:00
|
|
|
Span(v.verts, getVertsLength(v)),
|
|
|
|
Span(v.polys, getPolysLength(v)),
|
|
|
|
Span(v.regs, getRegsLength(v)),
|
|
|
|
Span(v.flags, getFlagsLength(v)),
|
|
|
|
Span(v.areas, getAreasLength(v)),
|
2021-07-13 22:03:10 +00:00
|
|
|
ArrayRef(v.bmin),
|
|
|
|
ArrayRef(v.bmax),
|
|
|
|
v.cs,
|
|
|
|
v.ch,
|
|
|
|
v.borderSize,
|
|
|
|
v.maxEdgeError
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
constexpr auto makeTuple(const rcPolyMeshDetail& v) noexcept
|
|
|
|
{
|
|
|
|
return std::tuple(
|
2021-07-26 18:18:01 +00:00
|
|
|
Span(v.meshes, getMeshesLength(v)),
|
|
|
|
Span(v.verts, getVertsLength(v)),
|
|
|
|
Span(v.tris, getTrisLength(v))
|
2021-07-13 22:03:10 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
constexpr auto makeTuple(const PreparedNavMeshData& v) noexcept
|
|
|
|
{
|
|
|
|
return std::tuple(
|
|
|
|
v.mUserId,
|
|
|
|
v.mCellHeight,
|
|
|
|
v.mCellSize,
|
|
|
|
Ref(v.mPolyMesh),
|
|
|
|
Ref(v.mPolyMeshDetail)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|