public static void RemoveDeviceIndexChangedListener(HandRole role, DeviceIndexChangedHandler handler)
 {
     RemoveDeviceIndexChangedListener(role.ToDeviceRole(), handler);
 }
예제 #2
0
 /// <summary>
 /// Returns device index of the device identified by the role
 /// Returns OpenVR.k_unTrackedDeviceIndexInvalid if the role doesn't assign to any device
 /// </summary>
 /// <returns>Current device index assigned to the role, should be tested by ViveRole.IsValidIndex before using it</returns>
 public static uint GetDeviceIndex(HandRole role)
 {
     return(GetDeviceIndex(role.ToDeviceRole()));
 }
 public static bool IsOutOfRange(HandRole role)
 {
     return(IsOutOfRange(role.ToDeviceRole()));
 }
 public static bool IsCalibrating(HandRole role)
 {
     return(IsCalibrating(role.ToDeviceRole()));
 }
 /// <summary>
 /// Returns true if the device identified by role is connected.
 /// </summary>
 public static bool IsConnected(HandRole role)
 {
     return(IsConnected(role.ToDeviceRole()));
 }
 /// <summary>
 /// Returns true if tracking data of the device identified by role has valid value.
 /// </summary>
 public static bool HasTracking(HandRole role)
 {
     return(HasTracking(role.ToDeviceRole()));
 }
 /// <summary>
 /// Returns true if the process has focus and the device identified by role is connected / has tracking
 /// </summary>
 public static bool IsValid(HandRole role)
 {
     return(IsValid(role.ToDeviceRole()));
 }
 /// <summary>
 /// Set target pose to tracking pose of the device identified by role relative to the origin
 /// </summary>
 public static void SetPose(Transform target, HandRole role, Transform origin = null)
 {
     SetPose(target, role.ToDeviceRole(), origin);
 }
 /// <summary>
 /// Returns tracking pose of the device identified by role
 /// </summary>
 public static Pose GetPose(HandRole role, Transform origin = null)
 {
     return(GetPose(role.ToDeviceRole(), origin));
 }
 public static Vector3 GetAngularVelocity(HandRole role, Transform origin = null)
 {
     return(GetAngularVelocity(role.ToDeviceRole(), origin));
 }
 public static bool IsUninitialized(HandRole role)
 {
     return(IsUninitialized(role.ToDeviceRole()));
 }