/*! * @file collision.h * Definition of a collision event */ #ifndef _COLLISION_H #define _COLLISION_H #include "vector.h" class WorldEntity; class BoundingVolume; //! A class representing a simple collision class Collision { public: Collision(); virtual ~Collision(); /** collides two WorldEntities @param entityA world entity A, @param entityB world entity B, @param bvA volume A @param bvB volumeB */ inline void collide(WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB) { this->entityA = entityA; this->entityB = entityB; this->bvA = bvA; this->bvB = bvB; } /** @return Collision WorldEntity A */ inline const WorldEntity* getEntityA() const { return this->entityA; } /** @return Collision WorldEntity B */ inline const WorldEntity* getEntityB() const { return this->entityB; } /** @return Bounding Volume from EntityA */ inline const BoundingVolume* getBVA() const { return this->bvA; } /** @return Bounding Volume from EntityB */ inline const BoundingVolume* getBVB() const { return this->bvB; } private: WorldEntity* entityA; //!< the collision body A WorldEntity* entityB; //!< the collision body B BoundingVolume* bvA; //!< reference to the bounding volume A BoundingVolume* bvB; //!< reference to the bounding volume B }; #endif /* _COLLISION_H */