Last change
on this file since 7903 was
7841,
checked in by patrick, 19 years ago
|
trunk: collision handle introduced and other stuff
|
File size:
1.2 KB
|
Line | |
---|
1 | /*! |
---|
2 | * @file collision_handle.h |
---|
3 | * @brief Definition of a collision handle: used for accesing per world entity collision events and reactions |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _COLLISION_HANDLE_H |
---|
7 | #define _COLLISION_HANDLE_H |
---|
8 | |
---|
9 | #include "base_object.h" |
---|
10 | |
---|
11 | class Collision; |
---|
12 | |
---|
13 | //! A class for defining collision reactions and storing events |
---|
14 | class CollisionHandle : public BaseObject { |
---|
15 | |
---|
16 | public: |
---|
17 | CollisionHandle(); |
---|
18 | virtual ~CollisionHandle(); |
---|
19 | |
---|
20 | void registerCollision(Collision* collision); |
---|
21 | |
---|
22 | void handleCollisions(); |
---|
23 | |
---|
24 | |
---|
25 | private: |
---|
26 | WorldEntity* owner; //!< the worldenity this reaction will be applied on |
---|
27 | classID targetClass; //!< the entities triggering the handle |
---|
28 | |
---|
29 | bool bDispatched; //!< true if this handle has already been dispatched |
---|
30 | bool bStopOnFirstCollision //!< true if the cd of this object should be terminated after one match |
---|
31 | |
---|
32 | std::vector<Collision*> collisionList; //!< a list full of collisions |
---|
33 | std::vector<classID> targetList; //!< a list of target classes for filtering |
---|
34 | |
---|
35 | }; |
---|
36 | |
---|
37 | #endif /* _COLLISION_HANDLE_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.