| 199 | } |
| 200 | |
| 201 | void DemoKeeper::updateCamera(int _x, int _y) |
| 202 | { |
| 203 | #ifdef MYGUI_OGRE_PLATFORM |
| 204 | static float gAngleH = 0; |
| 205 | static float gAngleV = -30; |
| 206 | |
| 207 | gAngleH += (float)_x * -0.1f; |
| 208 | |
| 209 | Ogre::Quaternion quatH(Ogre::Radian(Ogre::Degree(gAngleH)), Ogre::Vector3::UNIT_Y); |
| 210 | Ogre::Quaternion quatV(Ogre::Radian(Ogre::Degree(gAngleV)), Ogre::Vector3::UNIT_X); |
| 211 | quatH = quatH * quatV; |
| 212 | |
| 213 | Ogre::Vector3 vec(0, 0, 70); |
| 214 | vec = quatH * vec; |
| 215 | |
| 216 | vec.y += 30; |
| 217 | |
| 218 | getCameraNode()->setPosition(vec); |
| 219 | getCameraNode()->setOrientation(quatH); |
| 220 | #endif |
| 221 | } |
| 222 | |
| 223 | } // namespace demo |
| 224 |
nothing calls this directly
no test coverage detected