1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

move getCollisionBox from ActiveObject to interface class Collidableobject

This commit is contained in:
sapier 2012-02-07 16:52:32 +01:00
parent ffe6025f61
commit 435ea846db

36
src/collidableobject.h Normal file
View file

@ -0,0 +1,36 @@
/*
Minetest-c55
Copyright (C) 2012 sapier
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __COLLIDABLEOBJECT_H__
#define __COLLIDABLEOBJECT_H__
#include <irrlichttypes.h>
class CollidableObject {
public:
virtual aabb3f* getCollisionBox() = 0;
inline float getFlexibility() { return m_Flexibility; }
inline int getWeight() { return m_Weight; }
protected:
int m_Weight;
float m_Flexibility;
aabb3f m_collisionbox;
};
#endif //__COLLIDABLEOBJECT_H__