Changeset 1302 for code/branches/hud3/src/orxonox/hud/RadarOverlayElement.h
- Timestamp:
- May 15, 2008, 10:10:47 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hud3/src/orxonox/hud/RadarOverlayElement.h
r1295 r1302 32 32 #include <OgreOverlayElement.h> 33 33 #include <OgrePanelOverlayElement.h> 34 #include <math.h>35 34 #include <util/Math.h> 36 35 #include <string.h> 37 36 #include "core/Tickable.h" 38 37 #include <OgrePrerequisites.h> 38 #include "objects/SpaceShip.h" 39 39 #include "../OrxonoxPrereqs.h" 40 40 … … 42 42 { 43 43 44 class _OrxonoxExport RadarOverlayElement : public Ogre::PanelOverlayElement , public Tickable44 class _OrxonoxExport RadarOverlayElement : public Ogre::PanelOverlayElement 45 45 { 46 46 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_; 60 64 61 65 public: 62 66 63 67 RadarOverlayElement(const Ogre::String& name); 64 68 virtual ~RadarOverlayElement(); 65 69 virtual void initialise(); 66 70 void update(); 67 71 void initRadarOverlayElement(Real left, Real top, int dim, Ogre::OverlayContainer* container); 68 72 void setMainShipPosition(int dirX, int dirY, int dirZ, int ortX, int ortY, int ortZ); 69 void tick(float dt);70 73 int newShip(int X, int Y, int Z); 71 74 72 75 void resetShip(int shipID, int Y, int Z); 73 76 }; 74 } 77 } 75 78 76 79 #endif
Note: See TracChangeset
for help on using the changeset viewer.