QueryNodeData in c++

QueryNodeData in c++


I came into a simple but wired question.I want to get a single node depth in QueryNodeData with C++。but the positionWorld.x, positionworld.y and positionworld.z is always zero. I do some change in the sample gesture viewer in the sdk. the code is below:

PXCGesture *gesture=pp->QueryGesture();//return a instance of gesture

//if (qq->pipeline.IsDisconnected()) break;
//if (!qq->pipeline.IsImageFrame()) break;
//PXCGesture *gesture_depth = qq->pipeline.QueryGesture();
gesture->QueryNodeData(0,PXCGesture::GeoNode::LABEL_BODY_HAND_PRIMARY|PXCGesture::GeoNode::LABEL_FINGER_PINKY, &node_depth);
int sx =(int)node_depth.positionWorld.x; //positionWorld is invalid, i am confused
int sy =(int)node_depth.positionWorld.y;
int sz =(int)node_depth.positionWorld.z;
WCHAR szBuffer[1024];
swprintf(szBuffer,L"Horizon:%d Vertical:%d Depth:%d",sx,sz,sy);
SetStatus(hwndDlg,szBuffer);//display in status bar

I have been serching the answer for five days. waiting for someone to help me.

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Did you have creative camera? Can you run our PerC SDK gesture_viewer sample?

Leave a Comment

Please sign in to add a comment. Not a member? Join today