Ejemplo n.º 1
0
 public void process01_calVariable_ver2()
 {
     cur_bendAngle = ThePostureCal.calAngle_3D(
         posture_current.Joints[JointType.Head].Position,
         posture_current.Joints[JointType.Spine].Position, 2);
     facing_Angle = ThePostureCal.calAngle_3D(
         posture_current.Joints[JointType.ShoulderLeft].Position,
         posture_current.Joints[JointType.ShoulderRight].Position, 2);
     diff_bend_Angle = cur_bendAngle - initial_bend_ang;
     diff_sp_Y       = getY(JointType.Spine) - initial_y;
     diff_kneeL_Y    = getY(JointType.KneeLeft) - initial_knee_y;
     diff_kneeR_Y    = getY(JointType.KneeRight) - initial_knee_y;
     //
     diff_hL_sC_X = getX_diff(JointType.HandLeft, JointType.ShoulderCenter);
     diff_hL_sC_Y = getY_diff(JointType.HandLeft, JointType.ShoulderCenter);
     diff_hL_sC_Z = getZ_diff(JointType.HandLeft, JointType.ShoulderCenter);
     diff_hR_sC_X = getX_diff(JointType.HandRight, JointType.ShoulderCenter);
     diff_hR_sC_Y = getY_diff(JointType.HandRight, JointType.ShoulderCenter);
     diff_hR_sC_Z = getZ_diff(JointType.HandRight, JointType.ShoulderCenter);
     //Additional
     diff_fL_kL_Z = getZ_diff(JointType.FootLeft, JointType.KneeLeft);
     diff_fR_kR_Z = getZ_diff(JointType.FootRight, JointType.KneeRight);
     //
     diff_handLR_eu = getDist(JointType.HandLeft, JointType.HandRight);
     diff_footLR_Z  = getZ_diff(JointType.FootLeft, JointType.FootRight);
 }
Ejemplo n.º 2
0
 //use first row
 public void recog_InitialPosture(UKI_DataRaw bp)
 {
     TheInitialPosture.data_raw = bp;
     data.initial_y             = bp.Spine[1];
     data.initial_knee_y        = (bp.KneeLeft[1] + bp.KneeRight[1]) / 2;
     data.initial_bend_ang      = ThePostureCal.calAngle_3D(bp.Head, bp.Spine, 2);
 }
Ejemplo n.º 3
0
 public void process01_calVariable_ver1_optional(UKI_DataRaw current_data)
 {
     cur_bendAngle   = ThePostureCal.calAngle_3D(current_data.Head, current_data.Spine, 2);
     facing_Angle    = ThePostureCal.calAngle_3D(current_data.ShoulderLeft, current_data.ShoulderRight, 2);
     diff_bend_Angle = cur_bendAngle - initial_bend_ang;
     diff_kneeL_Y    = current_data.KneeLeft[1] - initial_knee_y;
     diff_kneeR_Y    = current_data.KneeRight[1] - initial_knee_y;
     //
     diff_hL_sC_X = current_data.HandLeft[0] - current_data.ShoulderCenter[0];
     diff_hL_sC_Y = current_data.HandLeft[1] - current_data.ShoulderCenter[1];
     diff_hL_sC_Z = current_data.HandLeft[2] - current_data.ShoulderCenter[2];
     diff_hR_sC_X = current_data.HandRight[0] - current_data.ShoulderCenter[0];
     diff_hR_sC_Y = current_data.HandRight[1] - current_data.ShoulderCenter[1];
     diff_hR_sC_Z = current_data.HandRight[2] - current_data.ShoulderCenter[2];
     //Additional
     diff_fL_kL_Z = current_data.FootLeft[2] - current_data.KneeLeft[2];
     diff_fR_kR_Z = current_data.FootRight[2] - current_data.KneeRight[2];
     //
     diff_handLR_eu = TheUKI.getDist(current_data.HandLeft, current_data.HandRight);
     diff_footLR_Z  = current_data.FootLeft[2] - current_data.FootRight[2];
 }