C# Class HTC.UnityPlugin.Vive.ViveRole

Provide static APIs to retrieve device index by semantic role Same mapping logic as SteamVR_ControllerManager does
Afficher le fichier Open project: Humon/server Class Usage Examples

Méthodes publiques

Свойство Type Description
DefaultBodyRoleHandler HTC.UnityPlugin.Vive.BodyRoleHandler
DefaultDeviceRoleHandler HTC.UnityPlugin.Vive.DeviceRoleHandler
DefaultHandRoleHandler HTC.UnityPlugin.Vive.HandRoleHandler
DefaultTrackerRoleHandler HTC.UnityPlugin.Vive.TrackerRoleHandler

Méthodes publiques

Méthode Description
GetDeviceIndex ( DeviceRole role ) : uint

Returns device index of the device identified by the role Returns INVALID_DEVICE_INDEX if the role doesn't assign to any device

GetDeviceIndex ( HandRole role ) : uint

Returns device index of the device identified by the role Returns INVALID_DEVICE_INDEX if the role doesn't assign to any device

GetDeviceIndexEx ( Type type, int roleValue ) : uint
GetDeviceIndexEx ( role ) : uint

Private Methods

Méthode Description
GetDeviceClass ( uint deviceIndex ) : VRModuleDeviceClass
GetModelNumber ( uint deviceIndex ) : string
GetSerialNumber ( uint deviceIndex ) : string
Initialize ( ) : void
IsValidIndex ( uint index ) : bool
OnDeviceConnected ( uint deviceIndex, bool connected ) : void
OnTrackedDeviceRoleChanged ( ) : void
TryGetDeviceIndexBySerialNumber ( string serialNumber, uint &deviceIndex ) : bool

Method Details

GetDeviceIndex() public static méthode

Returns device index of the device identified by the role Returns INVALID_DEVICE_INDEX if the role doesn't assign to any device
public static GetDeviceIndex ( DeviceRole role ) : uint
role DeviceRole
Résultat uint

GetDeviceIndex() public static méthode

Returns device index of the device identified by the role Returns INVALID_DEVICE_INDEX if the role doesn't assign to any device
public static GetDeviceIndex ( HandRole role ) : uint
role HandRole
Résultat uint

GetDeviceIndexEx() public static méthode

public static GetDeviceIndexEx ( Type type, int roleValue ) : uint
type Type
roleValue int
Résultat uint

GetDeviceIndexEx() public static méthode

public static GetDeviceIndexEx ( role ) : uint
role /// TRole can be DeviceRole, TrackerRole or any other enum type that have ViveRoleEnumAttribute. /// Use ViveRole.ValidateViveRoleEnum() to validate role type ///
Résultat uint

Property Details

DefaultBodyRoleHandler public_oe static_oe property

public static BodyRoleHandler,HTC.UnityPlugin.Vive DefaultBodyRoleHandler
Résultat HTC.UnityPlugin.Vive.BodyRoleHandler

DefaultDeviceRoleHandler public_oe static_oe property

public static DeviceRoleHandler,HTC.UnityPlugin.Vive DefaultDeviceRoleHandler
Résultat HTC.UnityPlugin.Vive.DeviceRoleHandler

DefaultHandRoleHandler public_oe static_oe property

public static HandRoleHandler,HTC.UnityPlugin.Vive DefaultHandRoleHandler
Résultat HTC.UnityPlugin.Vive.HandRoleHandler

DefaultTrackerRoleHandler public_oe static_oe property

public static TrackerRoleHandler,HTC.UnityPlugin.Vive DefaultTrackerRoleHandler
Résultat HTC.UnityPlugin.Vive.TrackerRoleHandler