Changeset 6001 for code/branches/steering
- Timestamp:
- Oct 28, 2009, 2:38:10 PM (15 years ago)
- Location:
- code/branches/steering/src/orxonox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/steering/src/orxonox/controllers/NewHumanController.cc
r5993 r6001 52 52 { 53 53 RegisterObject(NewHumanController); 54 55 CrossHairOverlay = new OrxonoxOverlay(this); 56 CrossHairOverlay->setBackgroundMaterial("Orxonox/Crosshair3"); 57 CrossHairOverlay->setSize(Vector2(0.08,0.08)); 58 CrossHairOverlay->show(); 54 59 } 55 60 … … 59 64 { 60 65 } 66 } 67 68 void NewHumanController::tick(float dt) { 69 CrossHairOverlay->setPosition(Vector2(static_cast<float>(this->currentYaw_), static_cast<float>(this->currentPitch_))); 70 71 HumanController::tick(dt); 61 72 } 62 73 … … 83 94 84 95 this->currentYaw_ = value.x; 85 std::cout << " X: " << static_cast<float>(this->currentPitch_) << " Y: " << static_cast<float>(this->currentYaw_) << endl;96 std::cout << "Y: " << static_cast<float>(this->currentPitch_) << " X: " << static_cast<float>(this->currentYaw_) << endl; 86 97 } 87 98 void NewHumanController::pitch(const Vector2& value) … … 91 102 92 103 this->currentPitch_ = value.x; 93 std::cout << " X: " << static_cast<float>(this->currentPitch_) << " Y: " << static_cast<float>(this->currentYaw_) << endl;104 std::cout << "Y: " << static_cast<float>(this->currentPitch_) << " X: " << static_cast<float>(this->currentYaw_) << endl; 94 105 } 95 106 -
code/branches/steering/src/orxonox/controllers/NewHumanController.h
r5993 r6001 33 33 34 34 #include "HumanController.h" 35 #include "overlays/OrxonoxOverlay.h" 35 36 36 37 namespace orxonox … … 42 43 virtual ~NewHumanController(); 43 44 44 //virtual void tick(float dt);45 virtual void tick(float dt); 45 46 46 47 virtual void yaw(const Vector2& value); … … 50 51 float currentYaw_; 51 52 float currentPitch_; 53 OrxonoxOverlay *CrossHairOverlay; 52 54 }; 53 55 } -
code/branches/steering/src/orxonox/overlays/OrxonoxOverlay.h
r5929 r6001 155 155 static void rotateOverlay(const std::string& name, const Degree& angle); 156 156 157 void setBackgroundMaterial(const std::string& material); 158 const std::string& getBackgroundMaterial() const; 159 157 160 virtual void changedVisibility(); 158 161 … … 187 190 virtual void positionChanged(); 188 191 189 void setBackgroundMaterial(const std::string& material);190 const std::string& getBackgroundMaterial() const;191 192 192 Ogre::Overlay* overlay_; //!< The overlay the entire class is about. 193 193 Ogre::PanelOverlayElement* background_; //!< Background image (blank per default).
Note: See TracChangeset
for help on using the changeset viewer.