#ifndef OPENMW_MWPHYSICS_HEIGHTFIELD_H #define OPENMW_MWPHYSICS_HEIGHTFIELD_H #include #include #include #include class btCollisionObject; class btHeightfieldTerrainShape; namespace osg { class Object; } namespace MWPhysics { class PhysicsTaskScheduler; class HeightField { public: HeightField(const float* heights, int x, int y, int size, int verts, float minH, float maxH, const osg::Object* holdObject, PhysicsTaskScheduler* scheduler); ~HeightField(); btCollisionObject* getCollisionObject(); const btCollisionObject* getCollisionObject() const; const btHeightfieldTerrainShape* getShape() const; private: std::unique_ptr mShape; std::unique_ptr mCollisionObject; osg::ref_ptr mHoldObject; #if BT_BULLET_VERSION < 310 std::vector mHeights; #endif PhysicsTaskScheduler* mTaskScheduler; void operator=(const HeightField&); HeightField(const HeightField&); }; } #endif