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

Function setResolution

Samples/NiViewer/Device.cpp:527–544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

525}
526
527void setResolution(MapGenerator* pGenerator, int res)
528{
529 if (pGenerator == NULL)
530 {
531 displayMessage("Stream does not exist!");
532 return;
533 }
534
535 XnMapOutputMode Mode;
536 pGenerator->GetMapOutputMode(Mode);
537 Mode.nXRes = Resolution((XnResolution)res).GetXResolution();
538 Mode.nYRes = Resolution((XnResolution)res).GetYResolution();
539 XnStatus nRetVal = pGenerator->SetMapOutputMode(Mode);
540 if (nRetVal != XN_STATUS_OK)
541 {
542 displayMessage("Failed to set resolution: %s", xnGetStatusString(nRetVal));
543 }
544}
545
546void setFPS(MapGenerator* pGenerator, int fps)
547{

Callers 3

setDepthResolutionFunction · 0.85
setImageResolutionFunction · 0.85
setIRResolutionFunction · 0.85

Calls 7

displayMessageFunction · 0.85
xnGetStatusStringFunction · 0.85
GetXResolutionMethod · 0.80
GetYResolutionMethod · 0.80
ResolutionClass · 0.50
GetMapOutputModeMethod · 0.45
SetMapOutputModeMethod · 0.45

Tested by

no test coverage detected