Logic rewrite

Update to LeapCSharp 5.13.1
Not tested in VR
This commit is contained in:
SDraw 2022-09-02 13:44:03 +03:00
parent a41f17af82
commit 3609500959
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
21 changed files with 566 additions and 103 deletions

View file

@ -799,17 +799,29 @@ namespace LeapInternal
public float y;
public float z;
[System.Obsolete("This code will be removed in the next major version of the plugin. Use 'ToVector3()' instead.")]
public Leap.Vector ToLeapVector()
{
return new Leap.Vector(x, y, z);
}
public UnityEngine.Vector3 ToVector3()
{
return new UnityEngine.Vector3(x, y, z);
}
[System.Obsolete("This signature will be removed in the next major version of the plugin. Use the one taking a Vector3 instead.")]
public LEAP_VECTOR(Leap.Vector leap)
{
x = leap.x;
y = leap.y;
z = leap.z;
}
public LEAP_VECTOR(UnityEngine.Vector3 vector)
{
x = vector.x;
y = vector.y;
z = vector.z;
}
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
@ -820,11 +832,17 @@ namespace LeapInternal
public float z;
public float w;
[System.Obsolete("This code will be removed in the next major version of the plugin. Use 'ToQuaternion()' instead.")]
public Leap.LeapQuaternion ToLeapQuaternion()
{
return new Leap.LeapQuaternion(x, y, z, w);
}
public UnityEngine.Quaternion ToQuaternion()
{
return new UnityEngine.Quaternion(x, y, z, w);
}
[System.Obsolete("This signature will be removed in the next major version of the plugin. Use the one taking a UnityEngine.Quaternion instead.")]
public LEAP_QUATERNION(Leap.LeapQuaternion q)
{
x = q.x;
@ -832,6 +850,13 @@ namespace LeapInternal
z = q.z;
w = q.w;
}
public LEAP_QUATERNION(UnityEngine.Quaternion q)
{
x = q.x;
y = q.y;
z = q.z;
w = q.w;
}
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]