Changeset 1329 for code/branches/hud3/src/orxonox/hud/RadarOverlayElement.h
- Timestamp:
- May 19, 2008, 10:51:53 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hud3/src/orxonox/hud/RadarOverlayElement.h
r1328 r1329 41 41 namespace orxonox 42 42 { 43 class _OrxonoxExport RadarOverlayElement : public Ogre::PanelOverlayElement 44 { 45 private: 46 Ogre::PanelOverlayElement* point; 47 Ogre::OverlayContainer* container_; 48 Ogre::OverlayManager* om; // pointer to the one and only overlay manager 49 Vector3 initialDir_; // direction of nose 50 Vector3 currentDir_; 51 Vector3 initialOrth_; // direction of normal 52 Vector3 currentOrth_; 53 Vector3 targetPos_; // position of target 54 Vector3 shipPos_; // position of ship 43 55 44 class _OrxonoxExport RadarOverlayElement : public Ogre::PanelOverlayElement 45 { 46 private: 56 Ogre::Real radius_; // radius on the radar 57 Ogre::Real phi_; // angle on the radar 58 bool right_; // checks whether the object is on the right side (since cos is not bijective) 59 Ogre::Real leftRel_, topRel_, dimRel_; // relative position/dimension 60 int left_, top_, dim_; // absolute position/dimension 61 int windowW_, windowH_; // absolute window dimensions 62 int count_; 47 63 48 Ogre::PanelOverlayElement* point; 49 Ogre::OverlayContainer* container_; 50 Ogre::OverlayManager* om; // pointer to the one and only overlay manager 51 Vector3 initialDir_; // direction of nose 52 Vector3 currentDir_; 53 Vector3 initialOrth_; // direction of normal 54 Vector3 currentOrth_; 55 Vector3 targetPos_; // position of target 56 Vector3 shipPos_; // position of ship 57 58 Ogre::Real radius_; // radius on the radar 59 Ogre::Real phi_; // angle on the radar 60 bool right_; // checks whether the object is on the right side (since cos is not bijective) 61 Ogre::Real leftRel_, topRel_, dimRel_; // relative position/dimension 62 int left_, top_, dim_; // absolute position/dimension 63 int windowW_, windowH_; // absolute window dimensions 64 int count_; 65 66 void resize(); 67 68 public: 69 70 RadarOverlayElement(const Ogre::String& name); 71 virtual ~RadarOverlayElement(); 72 virtual void initialise(); 73 void update(); 74 void init(Real leftRel, Real topRel, Real dimRel, Ogre::OverlayContainer* container); 75 void setMainShipPosition(int dirX, int dirY, int dirZ, int ortX, int ortY, int ortZ); 76 int newShip(int X, int Y, int Z); 77 78 void resetShip(int shipID, int Y, int Z); 79 }; 64 public: 65 RadarOverlayElement(const Ogre::String& name); 66 virtual ~RadarOverlayElement(); 67 virtual void initialise(); 68 void update(); 69 void init(Real leftRel, Real topRel, Real dimRel, Ogre::OverlayContainer* container); 70 void setMainShipPosition(int dirX, int dirY, int dirZ, int ortX, int ortY, int ortZ); 71 int newShip(int X, int Y, int Z); 72 void resize(); 73 void resetShip(int shipID, int Y, int Z); 74 }; 80 75 } 81 76
Note: See TracChangeset
for help on using the changeset viewer.