GetDeviceIndexEx() public static method

public static GetDeviceIndexEx ( Type type, int roleValue ) : uint
type Type
roleValue int
return uint
Example #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)));
 }
Example #2
0
 public static bool IsCalibrating(DeviceRole role)
 {
     return(IsCalibrating(ViveRole.GetDeviceIndexEx(role)));
 }
Example #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);
 }
Example #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);
 }
Example #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)));
 }
Example #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)));
 }
Example #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));
 }
Example #8
0
 public static bool TryGetHandJointPoseEx(Type roleType, int roleValue, HandJointName jointName, out JointPose pose)
 {
     return(TryGetHandJointPose(ViveRole.GetDeviceIndexEx(roleType, roleValue), jointName, out pose));
 }
Example #9
0
 public static JointEnumArray.IReadOnly GetAllHandJointsEx(Type roleType, int roleValue)
 {
     return(GetAllHandJoints(ViveRole.GetDeviceIndexEx(roleType, roleValue)));
 }
Example #10
0
 public static JointEnumArray.IReadOnly GetAllHandJointsEx <TRole>(TRole role)
 {
     return(GetAllHandJoints(ViveRole.GetDeviceIndexEx(role)));
 }
Example #11
0
 public static int GetHandJointCountEx <TRole>(TRole role)
 {
     return(GetHandJointCount(ViveRole.GetDeviceIndexEx(role)));
 }
Example #12
0
 public static bool TryGetHandJointPoseEx <TRole>(TRole role, HandJointName jointName, out JointPose pose)
 {
     return(TryGetHandJointPose(ViveRole.GetDeviceIndexEx(role), jointName, out pose));
 }
Example #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));
 }
Example #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);
 }
Example #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)));
 }
Example #16
0
 public static int GetHandJointCountEx(Type roleType, int roleValue)
 {
     return(GetHandJointCount(ViveRole.GetDeviceIndexEx(roleType, roleValue)));
 }
Example #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)));
 }
Example #18
0
 public static Vector3 GetVelocity(HandRole role, Transform origin = null)
 {
     return(GetVelocity(ViveRole.GetDeviceIndexEx(role), origin));
 }
Example #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)));
 }
Example #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)));
 }
Example #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));
 }
Example #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));
 }
Example #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)));
 }
Example #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));
 }
Example #25
0
 public static bool IsOutOfRange(DeviceRole role)
 {
     return(IsOutOfRange(ViveRole.GetDeviceIndexEx(role)));
 }
Example #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);
 }
Example #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);
 }