Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/FICN/src/orxonox/AIClass.h @ 697

Last change on this file since 697 was 673, checked in by rgrieder, 17 years ago
  • deleted obsolete classes: BaseEntity, Entity, Light and SceneNode (please complain if not agreed)
  • improved include guard naming consistency
File size: 2.4 KB
RevLine 
[673]1#ifndef _AIClass_H__
2#define _AIClass_H__
[597]3
4#include <Ogre.h>
5#include <OgreVector3.h>
6#include <OgreMath.h>
7
8#include <iostream>
9
[673]10// FIXME: using namespace xy; in header files is a very bad idea..
[597]11using namespace std;
12using namespace Ogre;
13
14class AIPilot {
15
16
17  /*
18  TASKS:                                                                         Requirements:
19
20    - Change actual Speed to required Speed                                          - Speed as Vector3 , spaceship(?) -> pilot attached to it or vice versa (?)
21    - Open fire, if allowed                                                          - Status of the fleet commander -> allowed to fire , fly etc.
22    - differ friend, ally and enemy                                                  - Lists of ships + who controls them
23    - report ship status to fleet commander                                          - Call own ship status -> ammo, damage etc.
24
25
26
27  */
28
29  public:
30    Vector3 speed;
31
32
33
34  //default constructor
35  AIPilot() {
36     speed = (1,0,0);
37  }
38
39  Vector3 steer(Vector3 reqSpeed) {
40    Quaternion sRotation = speed.getRotationTo(reqSpeed);
41    Radian rollarc = sRotation.getRoll();
42    Radian pitcharc = sRotation.getPitch();
43    Radian yawarc = sRotation.getYaw();
44    return Vector3((float)rollarc.valueRadians(), (float)pitcharc.valueRadians(), (float)yawarc.valueRadians());
45  }
46
47
48
49};
50
51class AIFleetCommander : public  AIPilot {
52
53
54  /*
55  TASKS:                                                                       Requirements:
56
57    - Same tasks as AI_Pilot (only if shipcontrol)                                   - Same as AI_Pilot
58    - Calculate required Speed for any ship in Fleet                                 - Knows all calculation functions
59    - Request fleet status and report to commander                                   - Better list of all ships -> more data for fleet ships
60
61
62
63  */
64
65  public:
66
67
68  //default constructor
69  AIFleetCommander() {
70
71  }
72
73
74
75};
76
77class AICommander : public  AIFleetCommander {
78
79
80  /*
81  TASKS:                                                                     Requirements:
82
83    - Decide on general tactics                                                      - List of general fleet status + all possible information on enemies
84    - Save and load tactical data (?)                                                - files with tactical data, e.g. success of strategy etc.
85
86
87
88  */
89
90  //default constructor
91  AICommander() {
92
93  }
94
95
96
97};
[673]98
99#endif /* _AIClass_H__ */
Note: See TracBrowser for help on using the repository browser.