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

Function setStreamCropping

Samples/NiViewer/Device.cpp:594–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

592}
593
594void setStreamCropping(MapGenerator* pGenerator, XnCropping* pCropping)
595{
596 if (pGenerator == NULL)
597 {
598 displayMessage("Stream does not exist!");
599 return;
600 }
601
602 if (!pGenerator->IsCapabilitySupported(XN_CAPABILITY_CROPPING))
603 {
604 displayMessage("Stream does not support cropping!");
605 return;
606 }
607
608 XnStatus nRetVal = pGenerator->GetCroppingCap().SetCropping(*pCropping);
609 if (nRetVal != XN_STATUS_OK)
610 {
611 displayMessage("Failed to set cropping: %s", xnGetStatusString(nRetVal));
612 return;
613 }
614}
615
616void setPlaybackSpeed(int ratioDiff)
617{

Callers 2

resetCroppingFunction · 0.85
drawCropStreamFunction · 0.85

Calls 5

displayMessageFunction · 0.85
xnGetStatusStringFunction · 0.85
GetCroppingCapMethod · 0.80
IsCapabilitySupportedMethod · 0.45
SetCroppingMethod · 0.45

Tested by

no test coverage detected