Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

merged the bsp branche back to trunk

File size: 850 bytes
RevLine 
[8006]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;
[8490]14class WorldEntity;
[8006]15
[8490]16
[8006]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
[8490]27    virtual void update(WorldEntity* owner) {}
28
29    /** use this to do some collision offline calculations, only called for bContinuousPoll == true */
[8029]30    inline bool isContinuousPoll() const { return this->bContinuousPoll; }
31
[8006]32  private:
[8029]33    bool                    bContinuousPoll;       //!< if true the collision rection function is also called, if there was no collision
[8006]34};
35
36#endif /* _COLLISION_REACTION_H */
Note: See TracBrowser for help on using the repository browser.