feature: PoseTransform运算符重载

This commit is contained in:
jackfiled 2023-03-02 19:06:32 +08:00
parent 2d2adefb96
commit 1b3fe7069c

View File

@ -70,6 +70,25 @@ public static void CalculateRotation(ref PoseTransform poseTransform, PoseLandma
}
public static Vector3 operator +(PoseTransform a) => a.ResultPosition;
public static Vector3 operator -(PoseTransform a) => -a.ResultPosition;
public static Vector3 operator +(PoseTransform a, PoseTransform b) =>
a.ResultPosition + b.ResultPosition;
public static Vector3 operator -(PoseTransform a, PoseTransform b) =>
a.ResultPosition - b.ResultPosition;
public static Vector3 operator *(PoseTransform a, int b) =>
a.ResultPosition * b;
public static Vector3 operator *(int a, PoseTransform b) =>
a * b.ResultPosition;
public static Vector3 operator /(PoseTransform a, int b) =>
a.ResultPosition / b;
/// <summary>
/// 获得同相关捕捉点关联的骨骼
/// </summary>