mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-03 10:29:22 +00:00
Update to Ultraleap Unity Plugin 6.12.1
This commit is contained in:
parent
90de21cce8
commit
2828de3818
2 changed files with 12 additions and 0 deletions
9
ml_lme/vendor/LeapCSharp/Device.cs
vendored
9
ml_lme/vendor/LeapCSharp/Device.cs
vendored
|
@ -263,6 +263,15 @@ namespace Leap
|
||||||
return devicePose;
|
return devicePose;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool deviceTransformAvailable = LeapC.GetDeviceTransformAvailable(Handle);
|
||||||
|
|
||||||
|
if (!deviceTransformAvailable)
|
||||||
|
{
|
||||||
|
devicePose = Pose.identity;
|
||||||
|
poseSet = true;
|
||||||
|
return Pose.identity;
|
||||||
|
}
|
||||||
|
|
||||||
float[] data = new float[16];
|
float[] data = new float[16];
|
||||||
eLeapRS result = LeapC.GetDeviceTransform(Handle, data);
|
eLeapRS result = LeapC.GetDeviceTransform(Handle, data);
|
||||||
|
|
||||||
|
|
3
ml_lme/vendor/LeapCSharp/LeapC.cs
vendored
3
ml_lme/vendor/LeapCSharp/LeapC.cs
vendored
|
@ -1052,6 +1052,9 @@ namespace LeapInternal
|
||||||
[DllImport("LeapC", EntryPoint = "LeapGetDeviceInfo", CharSet = CharSet.Ansi)]
|
[DllImport("LeapC", EntryPoint = "LeapGetDeviceInfo", CharSet = CharSet.Ansi)]
|
||||||
public static extern eLeapRS GetDeviceInfo(IntPtr hDevice, ref LEAP_DEVICE_INFO info);
|
public static extern eLeapRS GetDeviceInfo(IntPtr hDevice, ref LEAP_DEVICE_INFO info);
|
||||||
|
|
||||||
|
[DllImport("LeapC", EntryPoint = "LeapDeviceTransformAvailable")]
|
||||||
|
public static extern bool GetDeviceTransformAvailable(IntPtr hDevice);
|
||||||
|
|
||||||
[DllImport("LeapC", EntryPoint = "LeapGetDeviceTransform")]
|
[DllImport("LeapC", EntryPoint = "LeapGetDeviceTransform")]
|
||||||
public static extern eLeapRS GetDeviceTransform(IntPtr hDevice, [MarshalAs(UnmanagedType.LPArray, SizeConst = 16)] float[] transform);
|
public static extern eLeapRS GetDeviceTransform(IntPtr hDevice, [MarshalAs(UnmanagedType.LPArray, SizeConst = 16)] float[] transform);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue