Spelunx Cavern SDK
 
Loading...
Searching...
No Matches
Spelunx.Vive.ViveController Class Reference
Inheritance diagram for Spelunx.Vive.ViveController:
Inheritance graph
Collaboration diagram for Spelunx.Vive.ViveController:
Collaboration graph

Public Types

enum  Role { LeftHand , RightHand }
 
enum  ViveControllerButton : ulong {
  System = 1ul << (int)EVRButtonId.k_EButton_System , ApplicationMenu = 1ul << (int)EVRButtonId.k_EButton_ApplicationMenu , Grip = 1ul << (int)EVRButtonId.k_EButton_Grip , Axis0 = 1ul << (int)EVRButtonId.k_EButton_Axis0 ,
  Axis1 = 1ul << (int)EVRButtonId.k_EButton_Axis1 , Axis2 = 1ul << (int)EVRButtonId.k_EButton_Axis2 , Axis3 = 1ul << (int)EVRButtonId.k_EButton_Axis3 , Axis4 = 1ul << (int)EVRButtonId.k_EButton_Axis4 ,
  Touchpad = 1ul << (int)EVRButtonId.k_EButton_SteamVR_Touchpad , Trigger = 1ul << (int)EVRButtonId.k_EButton_SteamVR_Trigger
}
 

Public Member Functions

void TriggerHapticPulse (ushort durationMicroSec=500, EVRButtonId buttonId=EVRButtonId.k_EButton_SteamVR_Touchpad)
 
Vector2 GetInputAxis0 ()
 
Vector2 GetTrackpadAxis ()
 
Vector2 GetJoystickAxis ()
 
Vector2 GetTriggerAxis ()
 
Vector2 GetInputAxis4 ()
 
void SetOrigin (Transform t)
 

Static Public Member Functions

static string GetReadableRoleName (Role r)
 

Public Attributes

Role role
 
UnityEvent< ViveControllerButtononButtonPressed = new()
 
UnityEvent< ViveControllerButtononButtonReleased = new()
 
UnityEvent< ViveControllerButtononButtonHeld = new()
 
UnityEvent< ViveControllerButtononButtonTouchPressed = new()
 
UnityEvent< ViveControllerButtononButtonTouchReleased = new()
 
UnityEvent< ViveControllerButtononButtonTouchHeld = new()
 
- Public Attributes inherited from Spelunx.Vive.OVRT_TrackedDevice
Transform origin
 
UnityEvent< int > onDeviceIndexChanged
 

Additional Inherited Members

- Protected Attributes inherited from Spelunx.Vive.OVRT_TrackedDevice
UnityAction< int, bool > _onDeviceConnectedAction
 
- Properties inherited from Spelunx.Vive.OVRT_TrackedDevice
int DeviceIndex = -1 [get, protected set]
 
bool IsValid [get, protected set]
 
bool IsConnected [get, protected set]
 

Detailed Description

Definition at line 11 of file ViveController.cs.

Member Enumeration Documentation

◆ Role

Enumerator
LeftHand 
RightHand 

Definition at line 13 of file ViveController.cs.

◆ ViveControllerButton

Enumerator
System 
ApplicationMenu 
Grip 
Axis0 
Axis1 
Axis2 
Axis3 
Axis4 
Touchpad 
Trigger 

Definition at line 285 of file ViveController.cs.

Member Function Documentation

◆ GetInputAxis0()

Vector2 Spelunx.Vive.ViveController.GetInputAxis0 ( )
inline

Definition at line 163 of file ViveController.cs.

◆ GetInputAxis4()

Vector2 Spelunx.Vive.ViveController.GetInputAxis4 ( )
inline

Definition at line 183 of file ViveController.cs.

◆ GetJoystickAxis()

Vector2 Spelunx.Vive.ViveController.GetJoystickAxis ( )
inline

Definition at line 173 of file ViveController.cs.

◆ GetReadableRoleName()

static string Spelunx.Vive.ViveController.GetReadableRoleName ( Role  r)
inlinestatic

Definition at line 36 of file ViveController.cs.

◆ GetTrackpadAxis()

Vector2 Spelunx.Vive.ViveController.GetTrackpadAxis ( )
inline

Definition at line 168 of file ViveController.cs.

◆ GetTriggerAxis()

Vector2 Spelunx.Vive.ViveController.GetTriggerAxis ( )
inline

Definition at line 178 of file ViveController.cs.

◆ SetOrigin()

void Spelunx.Vive.ViveController.SetOrigin ( Transform  t)
inline

Definition at line 237 of file ViveController.cs.

◆ TriggerHapticPulse()

void Spelunx.Vive.ViveController.TriggerHapticPulse ( ushort  durationMicroSec = 500,
EVRButtonId  buttonId = EVRButtonId::k_EButton_SteamVR_Touchpad 
)
inline

Definition at line 46 of file ViveController.cs.

Member Data Documentation

◆ onButtonHeld

UnityEvent<ViveControllerButton> Spelunx.Vive.ViveController.onButtonHeld = new()

Definition at line 24 of file ViveController.cs.

◆ onButtonPressed

UnityEvent<ViveControllerButton> Spelunx.Vive.ViveController.onButtonPressed = new()

Definition at line 22 of file ViveController.cs.

◆ onButtonReleased

UnityEvent<ViveControllerButton> Spelunx.Vive.ViveController.onButtonReleased = new()

Definition at line 23 of file ViveController.cs.

◆ onButtonTouchHeld

UnityEvent<ViveControllerButton> Spelunx.Vive.ViveController.onButtonTouchHeld = new()

Definition at line 27 of file ViveController.cs.

◆ onButtonTouchPressed

UnityEvent<ViveControllerButton> Spelunx.Vive.ViveController.onButtonTouchPressed = new()

Definition at line 25 of file ViveController.cs.

◆ onButtonTouchReleased

UnityEvent<ViveControllerButton> Spelunx.Vive.ViveController.onButtonTouchReleased = new()

Definition at line 26 of file ViveController.cs.

◆ role

Role Spelunx.Vive.ViveController.role

Definition at line 19 of file ViveController.cs.


The documentation for this class was generated from the following file: