mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-05 03:19:23 +00:00
Custom event classes for patched methods
Update to LeapCSharp 6.15.0
This commit is contained in:
parent
4b879d53d5
commit
85925a7072
76 changed files with 3443 additions and 2187 deletions
43
ml_lme/vendor/LeapCSharp/Controller.cs
vendored
43
ml_lme/vendor/LeapCSharp/Controller.cs
vendored
|
@ -10,6 +10,7 @@ namespace Leap
|
|||
{
|
||||
using LeapInternal;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using UnityEngine;
|
||||
|
||||
|
@ -41,7 +42,6 @@ namespace Leap
|
|||
{
|
||||
Connection _connection;
|
||||
bool _disposed = false;
|
||||
bool _supportsMultipleDevices = true;
|
||||
string _serverNamespace = "Leap Service";
|
||||
|
||||
/// <summary>
|
||||
|
@ -232,6 +232,7 @@ namespace Leap
|
|||
/// Dispatched when a configuration setting changes.
|
||||
/// @since 3.0
|
||||
/// </summary>
|
||||
[Obsolete("Config is not used in Ultraleap's Tracking Service 5.X+. This will be removed in the next Major release")]
|
||||
public event EventHandler<ConfigChangeEventArgs> ConfigChange
|
||||
{
|
||||
add
|
||||
|
@ -403,6 +404,21 @@ namespace Leap
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dispatched when a Fiducial Marker has been tracked.
|
||||
/// </summary>
|
||||
public event EventHandler<FiducialPoseEventArgs> FiducialPose
|
||||
{
|
||||
add
|
||||
{
|
||||
_connection.LeapFiducialPose += value;
|
||||
}
|
||||
remove
|
||||
{
|
||||
_connection.LeapFiducialPose -= value;
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
|
@ -446,14 +462,16 @@ namespace Leap
|
|||
_connection = Connection.GetConnection(new Connection.Key(connectionKey, serverNamespace));
|
||||
_connection.EventContext = SynchronizationContext.Current;
|
||||
|
||||
if (_connection.IsRunning)
|
||||
_hasInitialized = true;
|
||||
|
||||
_connection.LeapInit += OnInit;
|
||||
_connection.LeapConnection += OnConnect;
|
||||
_connection.LeapConnectionLost += OnDisconnect;
|
||||
|
||||
_supportsMultipleDevices = supportsMultipleDevices;
|
||||
_serverNamespace = serverNamespace;
|
||||
|
||||
_connection.Start(serverNamespace, supportsMultipleDevices);
|
||||
StartConnection();
|
||||
}
|
||||
|
||||
|
||||
|
@ -467,7 +485,7 @@ namespace Leap
|
|||
/// </summary>
|
||||
public void StartConnection()
|
||||
{
|
||||
_connection.Start(_serverNamespace, _supportsMultipleDevices);
|
||||
_connection.Start(_serverNamespace);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -621,6 +639,21 @@ namespace Leap
|
|||
return _connection.IsDeviceAvailable(device);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Send a specific set of hints, if this does not include previously set ones, they will be cleared.
|
||||
/// </summary>
|
||||
/// <param name="hints">The hints you wish to send</param>
|
||||
/// <param name="device">An optional specific Device, otherwise the first found will be used</param>
|
||||
public void RequestHandTrackingHints(string[] hints, Device device = null)
|
||||
{
|
||||
if (device == null)
|
||||
{
|
||||
device = Devices.ActiveDevices.FirstOrDefault();
|
||||
}
|
||||
|
||||
_connection.RequestHandTrackingHintsOnDevice(device.Handle, hints);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// In most cases you should get Frame objects using the LeapProvider.CurrentFrame
|
||||
/// property. The data in Frame objects taken directly from a Leap.Controller instance
|
||||
|
@ -870,7 +903,7 @@ namespace Leap
|
|||
///
|
||||
/// @since 1.0
|
||||
/// </summary>
|
||||
[Obsolete("Config.cs is not used in Ultraleap's Tracking Service 5.X+. This will be removed in the next Major release")]
|
||||
[Obsolete("Config is not used in Ultraleap's Tracking Service 5.X+. This will be removed in the next Major release")]
|
||||
public Config Config
|
||||
{
|
||||
get
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue