Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 15, 2008, 10:10:47 PM (17 years ago)
Author:
FelixSchulthess
Message:

using vectors instead of integers now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/hud3/src/orxonox/hud/RadarOverlayElement.h

    r1295 r1302  
    3232#include <OgreOverlayElement.h>
    3333#include <OgrePanelOverlayElement.h>
    34 #include <math.h>
    3534#include <util/Math.h>
    3635#include <string.h>
    3736#include "core/Tickable.h"
    3837#include <OgrePrerequisites.h>
     38#include "objects/SpaceShip.h"
    3939#include "../OrxonoxPrereqs.h"
    4040
     
    4242{
    4343
    44   class _OrxonoxExport RadarOverlayElement : public Ogre::PanelOverlayElement, public Tickable
     44  class _OrxonoxExport RadarOverlayElement : public Ogre::PanelOverlayElement
    4545  {
    4646  private:
    47    
    48     PanelOverlayElement* point[100];
    49    
    50     Vector3 initialDir;         //initial direction
    51     int dirX_, dirY_, dirZ_;    //flying direction
    52     int ortX_, ortY_, ortZ_;    //orthogonal direction
    53     int dX_, dY_, dZ_;          //distance between main ship and the object
    54     int vecX_, vecY_, vecZ_;    //vector product dir X ort
    55     double alpha_;              //defines the radius in the radar
    56     double beta_;               //defines the angle in the radar
    57     bool right_;                //checks whether the object is on the right side (since cos is not bijective)
    58    
    59 //    static int ID = 0;
     47
     48    Ogre::PanelOverlayElement* point;
     49    Ogre::OverlayContainer* container_;
     50    Ogre::OverlayManager* om;       //pointer to the one and only overlay manager
     51    Vector3 initialDir_;                //initial direction of ship
     52    Vector3 currentDir_;            //current direction of ship
     53    Vector3 initialOrth_;
     54    Vector3 currentOrth_;
     55    Vector3 targetPos_;             //position of target
     56    Vector3 shipPos_;               //position of ship
     57    Vector3 vec_;                   //vector product dir X ort
     58    double alpha_;                  //defines the radius in the radar
     59    double beta_;                   //defines the angle in the radar
     60    float left_, top_;
     61    bool right_;                    //checks whether the object is on the right side (since cos is not bijective)
     62    int count_;
     63    int dim_;
    6064
    6165  public:
    62    
     66
    6367    RadarOverlayElement(const Ogre::String& name);
    6468    virtual ~RadarOverlayElement();
    6569    virtual void initialise();
    66 
     70    void update();
    6771    void initRadarOverlayElement(Real left, Real top, int dim, Ogre::OverlayContainer* container);
    6872    void setMainShipPosition(int dirX, int dirY, int dirZ, int ortX, int ortY, int ortZ);
    69     void tick(float dt);
    7073    int newShip(int X, int Y, int Z);
    71    
     74
    7275    void resetShip(int shipID, int Y, int Z);
    7376  };
    74 }       
     77}
    7578
    7679#endif
Note: See TracChangeset for help on using the changeset viewer.