Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 8076 was 7927, checked in by patrick, 18 years ago

trunk: added more cr framework, i will branche soon with this stuff so the trunk dosn't get involved to much in the development phase

File size: 1.3 KB
RevLine 
[7841]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"
[7927]10#include "cr_engine.h"
[7841]11
[7927]12#include <vector>
13
14
[7841]15class Collision;
[7927]16class WorldEntity;
[7841]17
[7927]18// struct CRType;
19
20
[7841]21//! A class for defining collision reactions and storing events
22class CollisionHandle : public BaseObject {
23
24 public:
[7927]25  CollisionHandle(WorldEntity* owner, CREngine::CRType type);
[7841]26  virtual ~CollisionHandle();
27
[7927]28
29  void addTarget();
30
[7841]31  void registerCollision(Collision* collision);
32
33  void handleCollisions();
34
35
36 private:
37   WorldEntity*                  owner;                   //!< the worldenity this reaction will be applied on
[7927]38   CREngine::CRType              type;                    //!< the reaction type
[7841]39
40   bool                          bDispatched;             //!< true if this handle has already been dispatched
[7927]41   bool                          bStopOnFirstCollision;   //!< true if the cd of this object should be terminated after one match
[7841]42
43   std::vector<Collision*>       collisionList;           //!< a list full of collisions
[7927]44   std::vector<long>             targetList;              //!< a list of target classes for filtering
[7841]45
46};
47
48#endif /* _COLLISION_HANDLE_H */
Note: See TracBrowser for help on using the repository browser.