1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 12:35:46 +00:00
OpenMW/components/detournavigator/recastmeshobject.hpp
Bret Curtis 14c93b3df0 Revert "Merge pull request #2204 from elsid/fix_navigator_update"
This reverts commit 26fb0e7a0f0729e727c72c2eefe1475f6cc8e956, reversing
changes made to 42b2391303b87a3fbe06cab17bc16079ae5a00f9.
2019-03-04 11:06:15 +01:00

54 lines
1.5 KiB
C++

#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_RECASTMESHOBJECT_H
#define OPENMW_COMPONENTS_DETOURNAVIGATOR_RECASTMESHOBJECT_H
#include "areatype.hpp"
#include <LinearMath/btTransform.h>
#include <functional>
#include <vector>
class btCollisionShape;
class btCompoundShape;
namespace DetourNavigator
{
class RecastMeshObject
{
public:
RecastMeshObject(const btCollisionShape& shape, const btTransform& transform, const AreaType areaType);
bool update(const btTransform& transform, const AreaType areaType);
const btCollisionShape& getShape() const
{
return mShape;
}
const btTransform& getTransform() const
{
return mTransform;
}
AreaType getAreaType() const
{
return mAreaType;
}
private:
std::reference_wrapper<const btCollisionShape> mShape;
btTransform mTransform;
AreaType mAreaType;
std::vector<RecastMeshObject> mChildren;
static bool updateCompoundObject(const btCompoundShape& shape, const AreaType areaType,
std::vector<RecastMeshObject>& children);
};
std::vector<RecastMeshObject> makeChildrenObjects(const btCollisionShape& shape, const AreaType areaType);
std::vector<RecastMeshObject> makeChildrenObjects(const btCompoundShape& shape, const AreaType areaType);
}
#endif