2023-03-05 22:26:01 +08:00
|
|
|
using Models;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
namespace Utils.PoseTransformHandlers
|
|
|
|
{
|
|
|
|
public class ZAxisHandler : IPoseTransformHandler
|
|
|
|
{
|
|
|
|
private Vector3 _result;
|
|
|
|
|
|
|
|
public void ReceivePoseLandmark(PoseLandmark landmark)
|
|
|
|
{
|
2023-03-29 22:58:07 +08:00
|
|
|
_result = new Vector3(landmark.X, landmark.Y, landmark.Z * 0.2f);
|
|
|
|
_result = _result * -1;
|
2023-03-05 22:26:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
public Vector3 GetResultPosition()
|
|
|
|
{
|
|
|
|
return _result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|