Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 9869 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
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{
[9869]20  ObjectListDeclaration(CollisionReaction);
[8006]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.