Last change
on this file since 731 was
708,
checked in by rgrieder, 17 years ago
|
- added Vector2, Vector3, Matrix3, ColourValue, Quaternion and String to the misc folder as header files
(each of them contains #include <string> … typedef std::string String , etc.)
- please use String from now on by including <misc/String.h"
- removed #include <OgreVector3.h", etc. from "CoreIncludes.h" (adjusted all source files)
- adjusted all the source files (except network, that keeps <string> for the moment) (what a mess..)
- moved usleep hack to misc/Sleep.h
- relative include paths for files from other root directories (like misc, network, etc.)
(but it stills writes "../Orxonox.h" when in folder orxonox/objects)
- "OgreSceneManager.h" —> <OgreSceneManager.h>
- included OrxonoxPrereqs in every file in folder orxonox
- moved HUD and ParticleInterface to namespace orxonox
- removed some using namespace Ogre/std when appropriate
- I hope I haven't forgotten important points..
|
File size:
2.3 KB
|
Line | |
---|
1 | #ifndef _AIClass_H__ |
---|
2 | #define _AIClass_H__ |
---|
3 | |
---|
4 | #include "misc/Vector3.h" |
---|
5 | |
---|
6 | namespace 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.