void NuiSkeletonPointsViewer::SetSkeletonPointsReadings(const NUI_SKELETON_DATA& skeletonData) { /* Vector4 headSkeletonPosition = skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HEAD]; LONG x = 0, y = 0; USHORT depthValue = 0; NuiTransformSkeletonToDepthImage(headSkeletonPosition, &x, &y, &depthValue, NUI_IMAGE_RESOLUTION_640x480); Vector4 test = NuiTransformDepthImageToSkeleton(x, y, depthValue << 3, NUI_IMAGE_RESOLUTION_640x480); */ SetSkeletonPointsReadings(skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HEAD].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HEAD].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HEAD].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SHOULDER_CENTER].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SHOULDER_CENTER].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SHOULDER_CENTER].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SPINE].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SPINE].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SPINE].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HIP_CENTER].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HIP_CENTER].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HIP_CENTER].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HAND_RIGHT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HAND_RIGHT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HAND_RIGHT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_WRIST_RIGHT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_WRIST_RIGHT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_WRIST_RIGHT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ELBOW_RIGHT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ELBOW_RIGHT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ELBOW_RIGHT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SHOULDER_RIGHT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SHOULDER_RIGHT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SHOULDER_RIGHT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HIP_RIGHT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HIP_RIGHT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HIP_RIGHT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_KNEE_RIGHT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_KNEE_RIGHT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_KNEE_RIGHT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ANKLE_RIGHT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ANKLE_RIGHT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ANKLE_RIGHT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_FOOT_RIGHT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_FOOT_RIGHT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_FOOT_RIGHT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HAND_LEFT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HAND_LEFT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HAND_LEFT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_WRIST_LEFT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_WRIST_LEFT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_WRIST_LEFT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ELBOW_LEFT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ELBOW_LEFT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ELBOW_LEFT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SHOULDER_LEFT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SHOULDER_LEFT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SHOULDER_LEFT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HIP_LEFT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HIP_LEFT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HIP_LEFT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_KNEE_LEFT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_KNEE_LEFT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_KNEE_LEFT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ANKLE_LEFT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ANKLE_LEFT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ANKLE_LEFT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_FOOT_LEFT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_FOOT_LEFT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_FOOT_LEFT].z); }
void NuiSkeletonPointsViewer::SetSkeletonPointsReadings(const NUI_SKELETON_DATA& skeletonData) { SetSkeletonPointsReadings(skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HEAD].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HEAD].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HEAD].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SHOULDER_CENTER].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SHOULDER_CENTER].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SHOULDER_CENTER].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SPINE].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SPINE].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SPINE].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HIP_CENTER].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HIP_CENTER].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HIP_CENTER].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HAND_RIGHT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HAND_RIGHT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HAND_RIGHT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_WRIST_RIGHT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_WRIST_RIGHT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_WRIST_RIGHT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ELBOW_RIGHT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ELBOW_RIGHT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ELBOW_RIGHT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SHOULDER_RIGHT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SHOULDER_RIGHT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SHOULDER_RIGHT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HIP_RIGHT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HIP_RIGHT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HIP_RIGHT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_KNEE_RIGHT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_KNEE_RIGHT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_KNEE_RIGHT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ANKLE_RIGHT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ANKLE_RIGHT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ANKLE_RIGHT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_FOOT_RIGHT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_FOOT_RIGHT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_FOOT_RIGHT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HAND_LEFT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HAND_LEFT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HAND_LEFT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_WRIST_LEFT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_WRIST_LEFT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_WRIST_LEFT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ELBOW_LEFT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ELBOW_LEFT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ELBOW_LEFT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SHOULDER_LEFT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SHOULDER_LEFT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_SHOULDER_LEFT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HIP_LEFT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HIP_LEFT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_HIP_LEFT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_KNEE_LEFT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_KNEE_LEFT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_KNEE_LEFT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ANKLE_LEFT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ANKLE_LEFT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_ANKLE_LEFT].z, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_FOOT_LEFT].x, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_FOOT_LEFT].y, skeletonData.SkeletonPositions[NUI_SKELETON_POSITION_FOOT_LEFT].z); }