Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 28, 2007, 10:30:29 PM (16 years ago)
Author:
rgrieder
Message:
  • 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:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/AIClass.h

    r673 r708  
    22#define _AIClass_H__
    33
    4 #include <Ogre.h>
    5 #include <OgreVector3.h>
    6 #include <OgreMath.h>
     4#include "misc/Vector3.h"
    75
    8 #include <iostream>
    9 
    10 // FIXME: using namespace xy; in header files is a very bad idea..
    11 using namespace std;
    12 using namespace Ogre;
    13 
    14 class AIPilot {
     6namespace orxonox
     7{
     8  class AIPilot
     9  {
    1510
    1611
    17   /*
    18   TASKS:                                                                         Requirements:
     12    /*
     13    TASKS:                                                                         Requirements:
    1914
    2015    - Change actual Speed to required Speed                                          - Speed as Vector3 , spaceship(?) -> pilot attached to it or vice versa (?)
     
    2520
    2621
    27   */
     22    */
    2823
    2924  public:
     
    3227
    3328
    34   //default constructor
    35   AIPilot() {
    36      speed = (1,0,0);
    37   }
     29    //default constructor
     30    AIPilot() {
     31      speed = (1,0,0);
     32    }
    3833
    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   }
     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    }
    4641
    4742
     43  };
    4844
    49 };
    50 
    51 class AIFleetCommander : public  AIPilot {
     45  class AIFleetCommander : public  AIPilot {
    5246
    5347
    54   /*
    55   TASKS:                                                                       Requirements:
     48    /*
     49    TASKS:                                                                       Requirements:
    5650
    5751    - Same tasks as AI_Pilot (only if shipcontrol)                                   - Same as AI_Pilot
     
    6155
    6256
    63   */
     57    */
    6458
    6559  public:
    6660
    6761
    68   //default constructor
    69   AIFleetCommander() {
     62    //default constructor
     63    AIFleetCommander() {
    7064
    71   }
     65    }
    7266
    7367
    7468
    75 };
     69  };
    7670
    77 class AICommander : public  AIFleetCommander {
     71  class AICommander : public  AIFleetCommander
     72  {
    7873
    7974
    80   /*
    81   TASKS:                                                                     Requirements:
     75    /*
     76    TASKS:                                                                     Requirements:
    8277
    8378    - Decide on general tactics                                                      - List of general fleet status + all possible information on enemies
     
    8681
    8782
    88   */
     83    */
    8984
    90   //default constructor
    91   AICommander() {
     85    //default constructor
     86    AICommander() {
    9287
    93   }
     88    }
    9489
    9590
     91  };
    9692
    97 };
     93}
    9894
    9995#endif /* _AIClass_H__ */
Note: See TracChangeset for help on using the changeset viewer.