Last change
on this file since 10663 was
10013,
checked in by patrick, 18 years ago
|
merged the collision reaction branche back to trunk
|
File size:
875 bytes
|
Rev | Line | |
---|
[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 | |
---|
[10013] | 11 | class WorldEntity; |
---|
[8006] | 12 | |
---|
[10013] | 13 | namespace CoRe |
---|
| 14 | { |
---|
[8006] | 15 | |
---|
[10013] | 16 | class Collision; |
---|
[8006] | 17 | |
---|
[10013] | 18 | //! A class representing a simple collision |
---|
| 19 | class CollisionReaction : public BaseObject |
---|
| 20 | { |
---|
| 21 | ObjectListDeclaration(CollisionReaction); |
---|
[8006] | 22 | public: |
---|
| 23 | CollisionReaction(); |
---|
| 24 | virtual ~CollisionReaction(); |
---|
| 25 | |
---|
| 26 | virtual void reactToCollision(Collision* collision) = 0; |
---|
| 27 | |
---|
[8490] | 28 | /** use this to do some collision offline calculations, only called for bContinuousPoll == true */ |
---|
[8029] | 29 | inline bool isContinuousPoll() const { return this->bContinuousPoll; } |
---|
| 30 | |
---|
[8006] | 31 | private: |
---|
[8029] | 32 | bool bContinuousPoll; //!< if true the collision rection function is also called, if there was no collision |
---|
[10013] | 33 | }; |
---|
[8006] | 34 | |
---|
[10013] | 35 | } |
---|
[8006] | 36 | #endif /* _COLLISION_REACTION_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.