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

Function drawInit

Samples/NiViewer/Draw.cpp:503–531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501}
502
503void drawInit()
504{
505 g_DepthColoring[DEPTH_OFF] = "Off";
506 g_DepthColoring[LINEAR_HISTOGRAM] = "Linear Histogram";
507 g_DepthColoring[PSYCHEDELIC] = "Psychedelic";
508 g_DepthColoring[PSYCHEDELIC_SHADES] = "Psychedelic (Millimeters)";
509 g_DepthColoring[RAINBOW] = "Rainbow";
510 g_DepthColoring[CYCLIC_RAINBOW] = "Cyclic Rainbow";
511 g_DepthColoring[CYCLIC_RAINBOW_HISTOGRAM] = "Cyclic Rainbow Histogram";
512 g_DepthColoring[STANDARD_DEVIATION] = "Standard Deviation";
513
514 g_ImageColoring[IMAGE_OFF] = "Off";
515 g_ImageColoring[IMAGE_NORMAL] = "Normal";
516 g_ImageColoring[DEPTH_MASKED_IMAGE] = "Depth Masked Image";
517
518 CreateRainbowPallet();
519
520 setPreset(7);
521
522 TextureMapInit(&g_texBackground, 1024, 1024, 3, 1024, 1024);
523
524 // load background image
525 xnOSLoadFile("..\\..\\..\\..\\Data\\RGBViewer\\back.raw", TextureMapGetLine(&g_texBackground, 0), 1024*1024*3);
526
527 TextureMapUpdate(&g_texBackground);
528
529 mouseInputRegisterForSelectionRectangle(drawSelectionChanged);
530 mouseInputRegisterForCursorMovement(drawCursorMoved);
531}
532
533void togglePointerMode(int)
534{

Callers 1

mainFunction · 0.85

Calls 8

CreateRainbowPalletFunction · 0.85
setPresetFunction · 0.85
TextureMapInitFunction · 0.85
xnOSLoadFileFunction · 0.85
TextureMapGetLineFunction · 0.85
TextureMapUpdateFunction · 0.85

Tested by

no test coverage detected