Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/collision_reaction/collision_reaction.h @ 8490

Last change on this file since 8490 was 8490, checked in by patrick, 18 years ago

merged the bsp branche back to trunk

File size: 850 bytes
Line 
1/*!
2 * @file collision_reaction.h
3 *  Definition of a generic collision reaction
4 */
5
6#ifndef _COLLISION_REACTION_H
7#define _COLLISION_REACTION_H
8
9#include "base_object.h"
10
11
12
13class Collision;
14class WorldEntity;
15
16
17//! A class representing a simple collision
18class CollisionReaction : public BaseObject
19{
20
21  public:
22    CollisionReaction();
23    virtual ~CollisionReaction();
24
25    virtual void reactToCollision(Collision* collision) = 0;
26
27    virtual void update(WorldEntity* owner) {}
28
29    /** use this to do some collision offline calculations, only called for bContinuousPoll == true */
30    inline bool isContinuousPoll() const { return this->bContinuousPoll; }
31
32  private:
33    bool                    bContinuousPoll;       //!< if true the collision rection function is also called, if there was no collision
34};
35
36#endif /* _COLLISION_REACTION_H */
Note: See TracBrowser for help on using the repository browser.