Ejemplo n.º 1
0
    def test_skeleton_frame(self):
        skel_data = ctypes.ARRAY(SkeletonData, NUI_SKELETON_COUNT)()
        sd = SkeletonData()
        sd.user_index = 5
        skel_data[0] = sd
        tests = [('timestamp', 'liTimeStamp', 1),
                 ('frame_number', 'dwFrameNumber', 2),
                 ('quality', 'Quality', SkeletonFrameQuality.camera_motion),
                 ('floor_clip_plane', 'vFloorClipPlane', Vector(2,4,6,8)),
                 ('normal_to_gravity', 'vNormalToGravity', Vector(1,2,3,4)),
                 ('skeleton_data', 'SkeletonData', skel_data),
                 ]

        self.interop_prop_test(SkeletonFrame(), tests)
Ejemplo n.º 2
0
    def test_skeleton_data(self):
        pos_arr = ctypes.ARRAY(Vector, JointId.count.value)()
        pos_arr[0] = Vector(2,4,6,8)
        joint_arr = ctypes.ARRAY(JointTrackingState, JointId.count.value)()
        joint_arr[0] = JointTrackingState.inferred

        tests = [('tracking_state', 'eTrackingState', SkeletonTrackingState.tracked),
                 ('tracking_id', 'dwTrackingID', 1),
                 ('enrollment_index', 'dwEnrollmentIndex', 1),
                 ('user_index', 'dwUserIndex', 1),
                 ('position', 'Position', Vector(1, 2, 3, 4)),
                 ('skeleton_positions', 'SkeletonPositions', pos_arr),
                 ('skeleton_position_tracking_states', 'eSkeletonPositionTrackingState', joint_arr),
                 ('skeleton_quality', 'Quality', SkeletonQuality.clipped_bottom),
                ]

        self.interop_prop_test(SkeletonData(), tests)