1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 15:49:56 +00:00
openmw-tes3mp/components/detournavigator/recastmeshbuilder.hpp
2018-10-13 22:16:25 +03:00

38 lines
956 B
C++

#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_RECASTMESHBUILDER_H
#define OPENMW_COMPONENTS_DETOURNAVIGATOR_RECASTMESHBUILDER_H
#include "recastmesh.hpp"
class btConcaveShape;
class btHeightfieldTerrainShape;
class btTransform;
class btTriangleCallback;
class btVector3;
namespace DetourNavigator
{
class RecastMeshBuilder
{
public:
RecastMeshBuilder(const Settings& settings);
void addObject(const btConcaveShape& shape, const btTransform& transform);
void addObject(const btHeightfieldTerrainShape& shape, const btTransform& transform);
std::shared_ptr<RecastMesh> create() const;
void reset();
private:
std::reference_wrapper<const Settings> mSettings;
std::vector<int> mIndices;
std::vector<float> mVertices;
void addObject(const btConcaveShape& shape, btTriangleCallback&& callback);
void addVertex(const btVector3& worldPosition);
};
}
#endif