Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 18, 2007, 12:32:09 PM (16 years ago)
Author:
rgrieder
Message:
  • removed all the "using namespace Ogre" in the header files
  • cleaned up the orxonox.cc header a little bit (every Ogre class referenced is now included via header file)
File:
1 edited

Legend:

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

    r596 r609  
    1414#endif
    1515
    16 using namespace Ogre;
    1716
    1817class Element // An element that flocks
     
    2019
    2120  public:
    22     Vector3 location;  // locationvector of the element
    23     Vector3 speed;  // speedvector of the element
    24     Vector3 acceleration;  // accelerationvector of the element
     21    Ogre::Vector3 location;  // locationvector of the element
     22    Ogre::Vector3 speed;  // speedvector of the element
     23    Ogre::Vector3 acceleration;  // accelerationvector of the element
    2524    bool movable;  // movability of the element, (false) gives the possiblity that an object can`t be moved by flocking but still gets into the calculation
    2625    static int const SEPERATIONDISTANCE = 300;  //detectionradius of seperation
     
    3837
    3938  //constructor
    40   Element(Vector3 location_, Vector3 speed_, Vector3 acceleration_, bool movable_) {
     39  Element(Ogre::Vector3 location_, Ogre::Vector3 speed_, Ogre::Vector3 acceleration_, bool movable_) {
    4140    acceleration = acceleration_;
    4241    speed = speed_;
     
    4645
    4746  //function to chance values of an element
    48   void setValues(Vector3 location_, Vector3 speed_, Vector3 acceleration_, bool movable_) {
     47  void setValues(Ogre::Vector3 location_, Ogre::Vector3 speed_, Ogre::Vector3 acceleration_, bool movable_) {
    4948    acceleration = acceleration_;
    5049    speed = speed_;
     
    5554  //calculates the distance between the element and an other point given by temp
    5655  float getDistance(Element temp) {
    57     Vector3 distance = temp.location-location;
     56    Ogre::Vector3 distance = temp.location-location;
    5857    return distance.length();
    5958  }
     
    7069
    7170  //separation-function (keep elements separated, avoid crashs)
    72   Vector3 separation(Element arrayOfElements[]) {
     71  Ogre::Vector3 separation(Element arrayOfElements[]) {
     72    using namespace Ogre;
    7373    Vector3 steering = Vector3(0,0,0); //steeringvector
    7474    Vector3 inverseDistance = Vector3(0,0,0);  //vector pointing away from possible collisions
     
    9595
    9696  //alignment-function (lead elements to the same heading)
    97   Vector3 alignment(Element arrayOfElements[]) {
     97  Ogre::Vector3 alignment(Element arrayOfElements[]) {
     98    using namespace Ogre;
    9899    Vector3 steering = Vector3(0,0,0); //steeringvector
    99100    int numberOfNeighbour = 0;  //number of observed neighbours
     
    113114
    114115  //cohseion-function (keep elements close to each other)
    115   Vector3 cohesion(Element arrayOfElements[]) {
     116  Ogre::Vector3 cohesion(Element arrayOfElements[]) {
     117    using namespace Ogre;
    116118    Vector3 steering = Vector3(0,0,0); //steeringvector
    117119    int numberOfNeighbour = 0;  //number of observed neighbours
Note: See TracChangeset for help on using the changeset viewer.