Last change
on this file since 724 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
|
Rev | Line | |
---|
[673] | 1 | #ifndef _AIClass_H__ |
---|
| 2 | #define _AIClass_H__ |
---|
[597] | 3 | |
---|
[708] | 4 | #include "misc/Vector3.h" |
---|
[597] | 5 | |
---|
[708] | 6 | namespace 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.