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