Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 15, 2008, 7:59:37 PM (17 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  
    2626*/
    2727
    28 /*      local coordinate system of space ship:
    29 
    30                         y
    31                         +   z
    32                         |  +
    33                         | /
    34                         |/
    35                x +------O
    36 */
    37 
    3828#ifndef _RADAR_H__
    3929#define _RADAR_H__
     
    4232#include <OgreOverlayElement.h>
    4333#include <OgrePanelOverlayElement.h>
    44 
     34#include <math.h>
     35#include <util/Math.h>
     36#include <string.h>
     37#include <Tickable.h>
    4538#include <OgrePrerequisites.h>
    4639#include "../OrxonoxPrereqs.h"
     
    4942{
    5043
    51   class _OrxonoxExport RadarOverlayElement : public Ogre::PanelOverlayElement
     44  class _OrxonoxExport RadarOverlayElement : public Ogre::PanelOverlayElement, public Tickable
    5245  {
    5346  private:
     
    5548    PanelOverlayElement* point[100];
    5649   
    57     int dirX_, dirY_, dirZ_;      //flying direction
    58     int ortX_, ortY_, ortZ_;      //orthogonal direction
    59     int dX_, dY_, dZ_;            //distance between main ship and the object
    60     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
    6155    double alpha_;              //defines the radius in the radar
    6256    double beta_;               //defines the angle in the radar
    6357    bool right_;                //checks whether the object is on the right side (since cos is not bijective)
    6458   
    65     //static int ID = 0;
     59//    static int ID = 0;
    6660
    6761  public:
     
    7367    void initRadarOverlayElement(Real left, Real top, int dim, Ogre::OverlayContainer* container);
    7468    void setMainShipPosition(int dirX, int dirY, int dirZ, int ortX, int ortY, int ortZ);
    75    
     69    void tick(float dt);
    7670    int newShip(int X, int Y, int Z);
    7771   
Note: See TracChangeset for help on using the changeset viewer.