1
0
Fork 0
blockofighter/src/shape.h

30 lines
542 B
C
Raw Normal View History

2014-02-16 14:32:28 +00:00
#ifndef __SHAPE_H_INCLUDED__
#define __SHAPE_H_INCLUDED__
class Shape;
class SphereShape;
class MeshShape;
#include "object.h"
/*
* Abstract class for object geometry
*/
2015-06-03 12:29:34 +00:00
class Shape {
2014-02-16 14:32:28 +00:00
protected:
2015-06-03 12:29:34 +00:00
Object *object;
2014-02-16 14:32:28 +00:00
public:
2015-06-03 12:29:34 +00:00
Shape(Object *object);
2014-02-16 14:32:28 +00:00
2015-06-03 12:29:34 +00:00
virtual float calculateMomentOfInertia(float *rotationvector) = 0;
2014-02-16 14:32:28 +00:00
2015-06-03 12:29:34 +00:00
virtual bool checkCollision(Object *target);
2014-02-16 14:32:28 +00:00
2015-06-03 12:29:34 +00:00
virtual bool checkCollisionPeer(Shape *target);
virtual bool checkCollisionPeer(SphereShape *target);
virtual bool checkCollisionPeer(MeshShape *target);
2014-02-16 14:32:28 +00:00
};
#endif