(bind-func kinect_get_joint_xy
(lambda (id:i64 joint_id:i32)
(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)
(tuple 0.0:f 0.0:f)
(let ((p (pref-ptr points (+ (* idx 25) (convert joint_id)))))
(tuple (tref p 0) (tref p 1)))))))