(bind-func kinect_get_joint_xy
(lambda (id:i64 joint_id:i32 xy:XTM_Point2d*)
(let ((points:XTM_Point2d* (kinect_update_body.points))
(ids:i64* (kinect_update_body.ids))
(i:i64 0) (idx:i64 -1))
(dotimes (i 6) (if (= (pref ids i) id) (set! idx i)))
(if (< idx 0)
(begin (tfill! xy 0.0 0.0) #f)
(let ((p (pref-ptr points (+ (* idx 25) (convert joint_id)))))
(tfill! xy (tref p 0) (tref p 1))
#t)))))