Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 15, 2008, 7:59:37 PM (16 years ago)
Author:
FelixSchulthess
Message:

trying to make it tickable

File:
1 edited

Legend:

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

    r1292 r1295  
    3232#include <OgreOverlayElement.h>
    3333#include <OgrePanelOverlayElement.h>
    34 
     34#include <math.h>
     35#include <util/Math.h>
     36#include <string.h>
     37#include "core/Tickable.h"
    3538#include <OgrePrerequisites.h>
    3639#include "../OrxonoxPrereqs.h"
     
    3942{
    4043
    41   class _OrxonoxExport RadarOverlayElement : public Ogre::PanelOverlayElement
     44  class _OrxonoxExport RadarOverlayElement : public Ogre::PanelOverlayElement, public Tickable
    4245  {
    4346  private:
     
    4548    PanelOverlayElement* point[100];
    4649   
    47     int dirX_, dirY_, dirZ_;      //flying direction
    48     int ortX_, ortY_, ortZ_;      //orthogonal direction
    49     int dX_, dY_, dZ_;            //distance between main ship and the object
    50     int vecX_, vecY_, vecZ_;      //vector product dir X ort
     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
    5155    double alpha_;              //defines the radius in the radar
    5256    double beta_;               //defines the angle in the radar
    5357    bool right_;                //checks whether the object is on the right side (since cos is not bijective)
    5458   
    55     //static int ID = 0;
     59//    static int ID = 0;
    5660
    5761  public:
     
    6367    void initRadarOverlayElement(Real left, Real top, int dim, Ogre::OverlayContainer* container);
    6468    void setMainShipPosition(int dirX, int dirY, int dirZ, int ortX, int ortY, int ortZ);
    65    
     69    void tick(float dt);
    6670    int newShip(int X, int Y, int Z);
    6771   
Note: See TracChangeset for help on using the changeset viewer.