Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 1045 was 742, checked in by landauf, 17 years ago

moved all files from misc and the tinyxml folder into the new util folder

File size: 2.3 KB
RevLine 
[673]1#ifndef _AIClass_H__
2#define _AIClass_H__
[597]3
[742]4#include "util/Vector3.h"
[597]5
[708]6namespace orxonox
7{
8  class AIPilot
9  {
[597]10
11
[708]12    /*
13    TASKS:                                                                         Requirements:
[597]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
[708]22    */
[597]23
24  public:
25    Vector3 speed;
26
27
28
[708]29    //default constructor
30    AIPilot() {
31      speed = (1,0,0);
32    }
[597]33
[708]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    }
[597]41
42
[708]43  };
[597]44
[708]45  class AIFleetCommander : public  AIPilot {
[597]46
47
[708]48    /*
49    TASKS:                                                                       Requirements:
[597]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
[708]57    */
[597]58
59  public:
60
61
[708]62    //default constructor
63    AIFleetCommander() {
[597]64
[708]65    }
[597]66
67
68
[708]69  };
[597]70
[708]71  class AICommander : public  AIFleetCommander
72  {
[597]73
74
[708]75    /*
76    TASKS:                                                                     Requirements:
[597]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
[708]83    */
[597]84
[708]85    //default constructor
86    AICommander() {
[597]87
[708]88    }
[597]89
90
[708]91  };
[597]92
[708]93}
[673]94
95#endif /* _AIClass_H__ */
Note: See TracBrowser for help on using the repository browser.