1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00
OpenMW/components/detournavigator/recastmeshbuilder.hpp

45 lines
1.1 KiB
C++
Raw Normal View History

2018-03-14 01:49:08 +03:00
#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_RECASTMESHBUILDER_H
#define OPENMW_COMPONENTS_DETOURNAVIGATOR_RECASTMESHBUILDER_H
#include "recastmesh.hpp"
2018-04-03 00:04:19 +03:00
class btCollisionShape;
class btCompoundShape;
2018-03-14 01:49:08 +03:00
class btConcaveShape;
class btHeightfieldTerrainShape;
class btTransform;
class btTriangleCallback;
class btVector3;
namespace DetourNavigator
{
class RecastMeshBuilder
{
public:
RecastMeshBuilder(const Settings& settings);
2018-04-03 00:04:19 +03:00
void addObject(const btCollisionShape& shape, const btTransform& transform);
void addObject(const btCompoundShape& shape, const btTransform& transform);
2018-03-14 01:49:08 +03:00
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