Changeset 288 in flair-src for trunk/lib/FlairSimulator/src/Gui_impl.cpp
- Timestamp:
- Jan 8, 2019, 2:45:15 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSimulator/src/Gui_impl.cpp
r286 r288 180 180 ITexture* texture=0; 181 181 IGUIFont* font =0; 182 VisualizationCamera::AxisType axisType=VisualizationCamera::AxisType::vrpn; 182 183 183 184 if (!driver->queryFeature(video::EVDF_RENDER_TO_TARGET)) { … … 216 217 217 218 setWindowCaption(0, 0); 219 220 Printf("\nUsefull keys:\n"); 221 Printf(" page up/down: circle between cameras\n"); 222 Printf(" a: change axis display (VRPN, earth or none)\n"); 218 223 219 224 while (device->run()) { … … 260 265 //render to texture for axis if possible 261 266 if (texture) { 262 cameras.at(cam_id)->renderAxisToTexture(texture );267 cameras.at(cam_id)->renderAxisToTexture(texture,font,axisType); 263 268 } 264 269 … … 278 283 279 284 driver->setViewPort(core::rect<s32>(0, 0, smgr->getVideoDriver()->getScreenSize().Width, smgr->getVideoDriver()->getScreenSize().Height)); 280 if(font) {281 font->draw(L"VRPN:",rect<s32>(10,scene_height-30,100,50),SColor(128,255,255,255));282 font->draw(L"X",rect<s32>(60,scene_height-30,100,50),SColor(255,255,0,0));283 font->draw(L"Y",rect<s32>(70,scene_height-30,100,50),SColor(255,0,255,0));284 font->draw(L"Z",rect<s32>(80,scene_height-30,100,50),SColor(255,0,0,255));285 286 }287 285 device->getGUIEnvironment()->drawAll(); 288 286 driver->endScene(); … … 306 304 receiver->SetModel(getModelFromVisualizationCamera(models,cameras.at(cam_id))); 307 305 setWindowCaption(cam_id, fps); 306 } 307 if (receiver->IsKeyDown(KEY_KEY_A)) { 308 switch(axisType) { 309 case VisualizationCamera::AxisType::vrpn: 310 axisType=VisualizationCamera::AxisType::earth; 311 break; 312 case VisualizationCamera::AxisType::earth: 313 axisType=VisualizationCamera::AxisType::none; 314 break; 315 case VisualizationCamera::AxisType::none: 316 axisType=VisualizationCamera::AxisType::vrpn; 317 break; 318 } 308 319 } 309 320
Note:
See TracChangeset
for help on using the changeset viewer.