Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/archive/shader/src/asylum/orxonox/AIClass.h @ 10904

Last change on this file since 10904 was 1505, checked in by rgrieder, 17 years ago

f* svn: It doesn't even inform you if you attempt to set a non existing property. It is svn:eol-style and not eol-style when using the command by the way…

  • Property svn:eol-style set to native
File size: 2.3 KB
Line 
1#ifndef _AIClass_H__
2#define _AIClass_H__
3
4#include "util/Vector3.h"
5
6namespace orxonox
7{
8  class AIPilot
9  {
10
11
12    /*
13    TASKS:                                                                         Requirements:
14
15    - Change actual Speed to required Speed                                          - Speed as Vector3 , spaceship(?) -> pilot attached to it or vice versa (?)
16    - Open fire, if allowed                                                          - Status of the fleet commander -> allowed to fire , fly etc.
17    - differ friend, ally and enemy                                                  - Lists of ships + who controls them
18    - report ship status to fleet commander                                          - Call own ship status -> ammo, damage etc.
19
20
21
22    */
23
24  public:
25    Vector3 speed;
26
27
28
29    //default constructor
30    AIPilot() {
31      speed = (1,0,0);
32    }
33
34    Vector3 steer(Vector3 reqSpeed) {
35      Quaternion sRotation = speed.getRotationTo(reqSpeed);
36      Radian rollarc = sRotation.getRoll();
37      Radian pitcharc = sRotation.getPitch();
38      Radian yawarc = sRotation.getYaw();
39      return Vector3((float)rollarc.valueRadians(), (float)pitcharc.valueRadians(), (float)yawarc.valueRadians());
40    }
41
42
43  };
44
45  class AIFleetCommander : public  AIPilot {
46
47
48    /*
49    TASKS:                                                                       Requirements:
50
51    - Same tasks as AI_Pilot (only if shipcontrol)                                   - Same as AI_Pilot
52    - Calculate required Speed for any ship in Fleet                                 - Knows all calculation functions
53    - Request fleet status and report to commander                                   - Better list of all ships -> more data for fleet ships
54
55
56
57    */
58
59  public:
60
61
62    //default constructor
63    AIFleetCommander() {
64
65    }
66
67
68
69  };
70
71  class AICommander : public  AIFleetCommander
72  {
73
74
75    /*
76    TASKS:                                                                     Requirements:
77
78    - Decide on general tactics                                                      - List of general fleet status + all possible information on enemies
79    - Save and load tactical data (?)                                                - files with tactical data, e.g. success of strategy etc.
80
81
82
83    */
84
85    //default constructor
86    AICommander() {
87
88    }
89
90
91  };
92
93}
94
95#endif /* _AIClass_H__ */
Note: See TracBrowser for help on using the repository browser.