Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/heathaze/src/lib/collision_reaction/collision_reaction.h @ 10633

Last change on this file since 10633 was 9869, checked in by bensch, 18 years ago

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File size: 893 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  ObjectListDeclaration(CollisionReaction);
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.