GetDeviceIndexEx() public static method

public static GetDeviceIndexEx ( Type type, int roleValue ) : uint
type Type
roleValue int
return uint
Esempio n. 1
0
 /// <param name="roleType">
 /// Can be DeviceRole, TrackerRole or any other enum type that have ViveRoleEnumAttribute.
 /// Use ViveRole.ValidateViveRoleEnum() to validate role type
 /// </param>
 public static bool IsConnectedEx(Type roleType, int roleValue)
 {
     return(IsConnected(ViveRole.GetDeviceIndexEx(roleType, roleValue)));
 }
Esempio n. 2
0
 public static bool IsCalibrating(DeviceRole role)
 {
     return(IsCalibrating(ViveRole.GetDeviceIndexEx(role)));
 }
Esempio n. 3
0
 /// <typeparam name="TRole">
 /// Can be DeviceRole, TrackerRole or any other enum type that have ViveRoleEnumAttribute.
 /// Use ViveRole.ValidateViveRoleEnum() to validate role type
 /// </typeparam>
 /// <param name="role">
 /// TRole can be DeviceRole, TrackerRole or any other enum type that have ViveRoleEnumAttribute.
 /// Use ViveRole.ValidateViveRoleEnum() to validate role type
 /// </param>
 public static void TriggerHapticPulseEx <TRole>(TRole role, ushort durationMicroSec = 500)
 {
     VRModule.TriggerViveControllerHaptic(ViveRole.GetDeviceIndexEx(role), durationMicroSec);
 }
Esempio n. 4
0
 /// <param name="roleType">
 /// Can be DeviceRole, TrackerRole or any other enum type that have ViveRoleEnumAttribute.
 /// Use ViveRole.ValidateViveRoleEnum() to validate role type
 /// </param>
 public static void SetPoseEx(Transform target, Type roleType, int roleValue, Transform origin = null)
 {
     SetPose(target, ViveRole.GetDeviceIndexEx(roleType, roleValue), origin);
 }
Esempio n. 5
0
 /// <summary>
 /// Returns true if tracking data of the device identified by role has valid value.
 /// </summary>
 public static bool HasTracking(DeviceRole role)
 {
     return(HasTracking(ViveRole.GetDeviceIndexEx(role)));
 }
Esempio n. 6
0
 /// <param name="roleType">
 /// Can be DeviceRole, TrackerRole or any other enum type that have ViveRoleEnumAttribute.
 /// Use ViveRole.ValidateViveRoleEnum() to validate role type
 /// </param>
 public static bool IsCalibratingEx(Type roleType, int roleValue)
 {
     return(IsCalibrating(ViveRole.GetDeviceIndexEx(roleType, roleValue)));
 }
Esempio n. 7
0
 /// <param name="roleType">
 /// Can be DeviceRole, TrackerRole or any other enum type that have ViveRoleEnumAttribute.
 /// Use ViveRole.ValidateViveRoleEnum() to validate role type
 /// </param>
 public static Vector3 GetAngularVelocityEx(Type roleType, int roleValue, Transform origin = null)
 {
     return(GetAngularVelocity(ViveRole.GetDeviceIndexEx(roleType, roleValue), origin));
 }
Esempio n. 8
0
 public static bool TryGetHandJointPoseEx(Type roleType, int roleValue, HandJointName jointName, out JointPose pose)
 {
     return(TryGetHandJointPose(ViveRole.GetDeviceIndexEx(roleType, roleValue), jointName, out pose));
 }
Esempio n. 9
0
 public static JointEnumArray.IReadOnly GetAllHandJointsEx(Type roleType, int roleValue)
 {
     return(GetAllHandJoints(ViveRole.GetDeviceIndexEx(roleType, roleValue)));
 }
Esempio n. 10
0
 public static JointEnumArray.IReadOnly GetAllHandJointsEx <TRole>(TRole role)
 {
     return(GetAllHandJoints(ViveRole.GetDeviceIndexEx(role)));
 }
Esempio n. 11
0
 public static int GetHandJointCountEx <TRole>(TRole role)
 {
     return(GetHandJointCount(ViveRole.GetDeviceIndexEx(role)));
 }
Esempio n. 12
0
 public static bool TryGetHandJointPoseEx <TRole>(TRole role, HandJointName jointName, out JointPose pose)
 {
     return(TryGetHandJointPose(ViveRole.GetDeviceIndexEx(role), jointName, out pose));
 }
Esempio n. 13
0
 /// <summary>
 /// Returns tracking pose of the device identified by role
 /// </summary>
 public static RigidPose GetPose(HandRole role, Transform origin = null)
 {
     return(GetPose(ViveRole.GetDeviceIndexEx(role), origin));
 }
Esempio n. 14
0
 /// <param name="roleType">
 /// Can be DeviceRole, TrackerRole or any other enum type that have ViveRoleEnumAttribute.
 /// Use ViveRole.ValidateViveRoleEnum() to validate role type
 /// </param>
 public static void TriggerHapticPulseEx(Type roleType, int roleValue, ushort durationMicroSec = 500)
 {
     VRModule.TriggerViveControllerHaptic(ViveRole.GetDeviceIndexEx(roleType, roleValue), durationMicroSec);
 }
Esempio n. 15
0
 /// <param name="roleType">
 /// Can be DeviceRole, TrackerRole or any other enum type that have ViveRoleEnumAttribute.
 /// Use ViveRole.ValidateViveRoleEnum() to validate role type
 /// </param>
 public static bool HasTrackingEx(Type roleType, int roleValue)
 {
     return(HasTracking(ViveRole.GetDeviceIndexEx(roleType, roleValue)));
 }
Esempio n. 16
0
 public static int GetHandJointCountEx(Type roleType, int roleValue)
 {
     return(GetHandJointCount(ViveRole.GetDeviceIndexEx(roleType, roleValue)));
 }
Esempio n. 17
0
 /// <param name="roleType">
 /// Can be DeviceRole, TrackerRole or any other enum type that have ViveRoleEnumAttribute.
 /// Use ViveRole.ValidateViveRoleEnum() to validate role type
 /// </param>
 public static bool IsOutOfRangeEx(Type roleType, int roleValue)
 {
     return(IsOutOfRange(ViveRole.GetDeviceIndexEx(roleType, roleValue)));
 }
Esempio n. 18
0
 public static Vector3 GetVelocity(HandRole role, Transform origin = null)
 {
     return(GetVelocity(ViveRole.GetDeviceIndexEx(role), origin));
 }
Esempio n. 19
0
 /// <param name="roleType">
 /// Can be DeviceRole, TrackerRole or any other enum type that have ViveRoleEnumAttribute.
 /// Use ViveRole.ValidateViveRoleEnum() to validate role type
 /// </param>
 public static bool IsUninitializedEx(Type roleType, int roleValue)
 {
     return(IsUninitialized(ViveRole.GetDeviceIndexEx(roleType, roleValue)));
 }
Esempio n. 20
0
 /// <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(ViveRole.GetDeviceIndexEx(role)));
 }
Esempio n. 21
0
 /// <param name="roleType">
 /// Can be DeviceRole, TrackerRole or any other enum type that have ViveRoleEnumAttribute.
 /// Use ViveRole.ValidateViveRoleEnum() to validate role type
 /// </param>
 public static Pose GetPoseEx(Type roleType, int roleValue, Transform origin = null)
 {
     return(GetPose(ViveRole.GetDeviceIndexEx(roleType, roleValue), origin));
 }
Esempio n. 22
0
 /// <typeparam name="TRole">
 /// Can be DeviceRole, TrackerRole or any other enum type that have ViveRoleEnumAttribute.
 /// Use ViveRole.ValidateViveRoleEnum() to validate role type
 /// </typeparam>
 /// <param name="role">
 /// TRole can be DeviceRole, TrackerRole or any other enum type that have ViveRoleEnumAttribute.
 /// Use ViveRole.ValidateViveRoleEnum() to validate role type
 /// </param>
 public static Vector3 GetAngularVelocityEx <TRole>(TRole role, Transform origin = null)
 {
     return(GetAngularVelocity(ViveRole.GetDeviceIndexEx(role), origin));
 }
Esempio n. 23
0
 /// <summary>
 /// Returns true if the device identified by role is connected.
 /// </summary>
 public static bool IsConnected(DeviceRole role)
 {
     return(IsConnected(ViveRole.GetDeviceIndexEx(role)));
 }
Esempio n. 24
0
 /// <typeparam name="TRole">
 /// Can be DeviceRole, TrackerRole or any other enum type that have ViveRoleEnumAttribute.
 /// Use ViveRole.ValidateViveRoleEnum() to validate role type
 /// </typeparam>
 /// <param name="role">
 /// TRole can be DeviceRole, TrackerRole or any other enum type that have ViveRoleEnumAttribute.
 /// Use ViveRole.ValidateViveRoleEnum() to validate role type
 /// </param>
 public static Pose GetPoseEx <TRole>(TRole role, Transform origin = null)
 {
     return(GetPose(ViveRole.GetDeviceIndexEx(role), origin));
 }
Esempio n. 25
0
 public static bool IsOutOfRange(DeviceRole role)
 {
     return(IsOutOfRange(ViveRole.GetDeviceIndexEx(role)));
 }
Esempio n. 26
0
 /// <typeparam name="TRole">
 /// Can be DeviceRole, TrackerRole or any other enum type that have ViveRoleEnumAttribute.
 /// Use ViveRole.ValidateViveRoleEnum() to validate role type
 /// </typeparam>
 /// <param name="role">
 /// TRole can be DeviceRole, TrackerRole or any other enum type that have ViveRoleEnumAttribute.
 /// Use ViveRole.ValidateViveRoleEnum() to validate role type
 /// </param>
 public static void SetPoseEx <TRole>(Transform target, TRole role, Transform origin = null)
 {
     SetPose(target, ViveRole.GetDeviceIndexEx(role), origin);
 }
Esempio n. 27
0
 public static bool IsUninitialized(DeviceRole role)
 {
     return(IsUninitialized(ViveRole.GetDeviceIndexEx(role)));
 }
 /// <param name="roleType">
 /// Can be DeviceRole, TrackerRole or any other enum type that have ViveRoleEnumAttribute.
 /// Use ViveRole.ValidateViveRoleEnum() to validate role type
 /// </param>
 public static void TriggerHapticVibrationEx(Type roleType, int roleValue, float durationSeconds = 0.01f, float frequency = 85f, float amplitude = 0.125f, float startSecondsFromNow = 0f)
 {
     VRModule.TriggerHapticVibration(ViveRole.GetDeviceIndexEx(roleType, roleValue), durationSeconds, frequency, amplitude, startSecondsFromNow);
 }