using OpenCVForUnity.CoreModule; using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class HeadTurnRight : PoseBase { public override bool CheckPose(List points) { if (!CheckPoint(points, "Nose")) return false; //右转头检测 if (!CheckPoint(points, "REar") && CheckPoint(points, "LEar")) return true; if (Math.Abs(points[YogaConfig.BODY_PARTS["REar"]].x - points[YogaConfig.BODY_PARTS["Nose"]].x) > Math.Abs(points[YogaConfig.BODY_PARTS["LEar"]].x - points[YogaConfig.BODY_PARTS["Nose"]].x)) { return true; } return false; } }