diag(windows-nui): log HAND_L/R + shoulder joint positions (and hand-relative-to-body) to debug menu cursor pinning

This commit is contained in:
kinect-bot committed 2026-11-26 21:04:15 -05:00
1 parent dede81706a
commit 256a9056c0
1 file changed
+15
+15
View File
@@ -734,6 +734,21 @@ void VirtualKinectSensor::BuildSkeletonFrame(const SourceFrame& src) {
requested_tracked_ids_[0], requested_tracked_ids_[1]);
}
static unsigned hand_calls = 0;
if ((hand_calls++ % 60u) == 0u) {
const NUI_SKELETON_DATA& d0 = frame.SkeletonData[0];
const Vector4& hr = d0.SkeletonPositions[11]; // HAND_R
const Vector4& hl = d0.SkeletonPositions[7]; // HAND_L
const Vector4& sc = d0.SkeletonPositions[2]; // SHOULDER_CENTER
const Vector4& sr = d0.SkeletonPositions[8]; // SHOULDER_R
ShimLog(
"hands: HAND_R=(%.2f,%.2f,%.2f) HAND_L=(%.2f,%.2f,%.2f) "
"SH_C=(%.2f,%.2f,%.2f) handR-relSHC=(%.2f,%.2f,%.2f) "
"handR-relSHR=(%.2f,%.2f,%.2f)",
hr.x, hr.y, hr.z, hl.x, hl.y, hl.z, sc.x, sc.y, sc.z, hr.x - sc.x,
hr.y - sc.y, hr.z - sc.z, hr.x - sr.x, hr.y - sr.y, hr.z - sr.z);
}
latest_skeleton_ = frame;
has_skeleton_ = true;
}