1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-08 09:37:53 +00:00
OpenMW/apps/openmw/mwphysics/heightfield.hpp
2020-05-13 19:24:28 +02:00

42 lines
950 B
C++

#ifndef OPENMW_MWPHYSICS_HEIGHTFIELD_H
#define OPENMW_MWPHYSICS_HEIGHTFIELD_H
#include <osg/ref_ptr>
#include <LinearMath/btScalar.h>
#include <vector>
class btCollisionObject;
class btHeightfieldTerrainShape;
namespace osg
{
class Object;
}
namespace MWPhysics
{
class HeightField
{
public:
HeightField(const float* heights, int x, int y, float triSize, float sqrtVerts, float minH, float maxH, const osg::Object* holdObject);
~HeightField();
btCollisionObject* getCollisionObject();
const btCollisionObject* getCollisionObject() const;
const btHeightfieldTerrainShape* getShape() const;
private:
btHeightfieldTerrainShape* mShape;
btCollisionObject* mCollisionObject;
osg::ref_ptr<const osg::Object> mHoldObject;
std::vector<btScalar> mHeights;
void operator=(const HeightField&);
HeightField(const HeightField&);
};
}
#endif