Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/terrain.old/src/world_entities/weapons/aiming_system.h @ 10637

Last change on this file since 10637 was 9235, checked in by bensch, 18 years ago

merged the presentation back

File size: 1018 bytes
Line 
1/*!
2 * @file aiming_system.h
3 *  Definition of
4 */
5
6#ifndef _AIMING_SYSTEM_H
7#define _AIMING_SYSTEM_H
8
9
10#include "world_entity.h"
11
12
13
14// FORWARD DECLARATION
15class TiXmlElement;
16class BVTree;
17class Model;
18class OBBTree;
19
20
21class AimingSystem : public WorldEntity
22{
23
24 public:
25  AimingSystem(WorldEntity* owner = NULL);
26  virtual ~AimingSystem();
27
28  void init();
29
30  WorldEntity* getNearestTarget();
31  void flushList() { this->selectionList.clear(); }
32
33  void setRange(float range){this->range = range;};
34
35  virtual void hit(float damage, WorldEntity* killer);
36  virtual void destroy(WorldEntity* entity) {}
37
38  virtual void tick(float dt);
39  virtual void draw() const;
40
41
42 private:
43   float                       range;                //!<
44   float                       sideLength;
45   std::vector<WorldEntity*>   selectionList;        //!< the selections
46
47   WorldEntity*                owner;                //!< the owner of the targeting system
48
49   OBBTree*                    obbTree;
50
51};
52
53#endif /* _AIMING_SYSTEM_H */
Note: See TracBrowser for help on using the repository browser.