d
This commit is contained in:
parent
79b9e91149
commit
b99a03c940
@ -1,4 +1,5 @@
|
|||||||
using Dto;
|
using Common;
|
||||||
|
using Dto;
|
||||||
using SportExpand;
|
using SportExpand;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@ -56,11 +57,20 @@ namespace Views.JumpRope
|
|||||||
if (rightAnkle == null)
|
if (rightAnkle == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
double xNorm = rightAnkle.X / 1920.0;
|
double xNorm = rightAnkle.X / AppSettings.Resolution_X;
|
||||||
double yNorm = rightAnkle.Y / 1080.0;
|
double yNorm = rightAnkle.Y / AppSettings.Resolution_Y;
|
||||||
|
|
||||||
return xNorm >= 0.44 && xNorm <= 0.57 && yNorm >= 0.81;
|
// 控制点
|
||||||
|
double cx = AppSettings.ControlPoint.X; // 已经是归一化 0~1
|
||||||
|
double cy = AppSettings.ControlPoint.Y;
|
||||||
|
|
||||||
|
double halfWidth = AppSettings.AreaSize.X;
|
||||||
|
double halfHeight = AppSettings.AreaSize.Y;
|
||||||
|
|
||||||
|
return xNorm >= (cx - halfWidth) && xNorm <= (cx + halfWidth) &&
|
||||||
|
yNorm >= (cy - halfHeight) && yNorm <= (cy + halfHeight);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (human != null)
|
if (human != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user