43 lines
967 B
C#
43 lines
967 B
C#
using OpenCVForUnity.CoreModule;
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class BodyTurnLeft : PoseBase
|
|
{
|
|
public BodyTurnLeft(ModelType name) : base(name) { }
|
|
|
|
public override bool CheckPose(List<Point> points)
|
|
{
|
|
if (!CheckPoint(points, "LShoulder") &&
|
|
!CheckPoint(points, "RHip"))
|
|
return false;
|
|
//左转身检测
|
|
if (points[YogaConfig.BODY_PARTS["LShoulder"]].x < points[YogaConfig.BODY_PARTS["RHip"]].x)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
public override void ShowHint()
|
|
{
|
|
|
|
}
|
|
|
|
public override void ProcessFailCallBack()
|
|
{
|
|
//YogaManager.Instance.UpdateStatus?.Invoke(string.Empty);
|
|
}
|
|
|
|
public override void ProcessSuccessCallBack(Action callback)
|
|
{
|
|
YogaManager.Instance.UpdateStatus?.Invoke("左转身");
|
|
}
|
|
}
|
|
|
|
//public class NodCheck : PoseBase
|
|
//{
|
|
|
|
//} |