Changeset 3301 for code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc
- Timestamp:
- Jul 18, 2009, 4:03:59 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc
r3300 r3301 82 82 // Get aspect ratio from the render window. Later on, we get informed automatically 83 83 Ogre::RenderWindow* defaultWindow = GraphicsManager::getInstance().getRenderWindow(); 84 this->windowAspectRatio_ = (float)defaultWindow->getWidth() / defaultWindow->getHeight();84 this->windowAspectRatio_ = static_cast<float>(defaultWindow->getWidth()) / defaultWindow->getHeight(); 85 85 this->sizeCorrectionChanged(); 86 86 … … 183 183 void OrxonoxOverlay::windowResized(unsigned int newWidth, unsigned int newHeight) 184 184 { 185 this->windowAspectRatio_ = newWidth/(float)newHeight;185 this->windowAspectRatio_ = static_cast<float>(newWidth) / newHeight; 186 186 this->sizeCorrectionChanged(); 187 187 } … … 215 215 if (angle < 0.0) 216 216 angle = -angle; 217 angle -= 180.0f * static_cast e<int>(angle / 180.0);217 angle -= 180.0f * static_cast<int>(angle / 180.0); 218 218 219 219 // take the reverse if angle is about 90 degrees
Note: See TracChangeset
for help on using the changeset viewer.