MCPcopy Create free account
hub / github.com/OpenNI/OpenNI / glutKeyboard

Method glutKeyboard

Samples/NiUserSelection/SceneDrawer.cpp:389–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

387
388
389void SceneDrawer::glutKeyboard (unsigned char key, int /*x*/, int /*y*/)
390{
391 SceneDrawer *singleton=GetInstance();
392 switch (key)
393 {
394 case 27:
395 singleton->ExitSample(EXIT_SUCCESS);
396 case 'b':
397 // Draw background?
398 singleton->g_bDrawBackground = !singleton->g_bDrawBackground;
399 break;
400 case 'x':
401 // Draw pixels at all?
402 singleton->g_bDrawPixels = !singleton->g_bDrawPixels;
403 break;
404 case 's':
405 // Draw Skeleton?
406 singleton->g_bDrawSkeleton = !singleton->g_bDrawSkeleton;
407 break;
408 case 'i':
409 // Print label?
410 singleton->g_bPrintID = !singleton->g_bPrintID;
411 break;
412 case 'l':
413 // Print ID & state as label, or only ID?
414 singleton->g_bPrintState = !singleton->g_bPrintState;
415 break;
416 case'p':
417 singleton->g_bPause=!singleton->g_bPause;
418 break;
419 }
420}
421
422
423

Callers

nothing calls this directly

Calls 1

ExitSampleMethod · 0.80

Tested by

no test coverage detected