2018-03-13 22:49:08 +00:00
|
|
|
#include "recastmesh.hpp"
|
|
|
|
#include "settings.hpp"
|
|
|
|
|
2018-04-01 19:17:04 +00:00
|
|
|
#include <Recast.h>
|
|
|
|
|
2018-03-13 22:49:08 +00:00
|
|
|
namespace DetourNavigator
|
|
|
|
{
|
|
|
|
RecastMesh::RecastMesh(std::vector<int> indices, std::vector<float> vertices, const Settings& settings)
|
|
|
|
: mIndices(std::move(indices))
|
|
|
|
, mVertices(std::move(vertices))
|
|
|
|
, mChunkyTriMesh(mVertices, mIndices, settings.mTrianglesPerChunk)
|
|
|
|
{
|
2018-04-15 22:39:51 +00:00
|
|
|
if (getVerticesCount())
|
|
|
|
rcCalcBounds(mVertices.data(), static_cast<int>(getVerticesCount()), mBoundsMin.ptr(), mBoundsMax.ptr());
|
2018-03-13 22:49:08 +00:00
|
|
|
}
|
|
|
|
}
|