// --------------------------------------------------------------------------------------------------------------------
//
// Copyright (c) VRMADA, All rights reserved.
//
// --------------------------------------------------------------------------------------------------------------------
using System.Collections.Generic;
using UltimateXR.Core;
using UltimateXR.Devices.Integrations.SteamVR;
namespace UltimateXR.Devices.Integrations.Oculus
{
///
/// Oculus Touch controllers input using SteamVR.
///
public class UxrOculusTouchRiftSQuestInputSteamVR : UxrSteamVRControllerInput
{
#region Public Overrides UxrSteamVRControllerInput
///
public override IEnumerable ControllerNames
{
get
{
yield return "Oculus Quest (Left Controller)";
yield return "Oculus Quest (Right Controller)";
yield return "Oculus Rift S (Left Controller)";
yield return "Oculus Rift S (Right Controller)";
}
}
#endregion
#region Public Overrides UxrControllerInput
///
public override UxrControllerSetupType SetupType => UxrControllerSetupType.Dual;
///
public override bool MainJoystickIsTouchpad => false;
///
public override bool HasControllerElements(UxrHandSide handSide, UxrControllerElements controllerElements)
{
uint validElements = (uint)(UxrControllerElements.Joystick | // Joystick
UxrControllerElements.Grip | // Grip
UxrControllerElements.Trigger | // Trigger
UxrControllerElements.Button1 | // Button A
UxrControllerElements.Button2 | // Button B
UxrControllerElements.DPad);
if (handSide == UxrHandSide.Left)
{
validElements |= (uint)UxrControllerElements.Menu;
}
return (validElements & (uint)controllerElements) == (uint)controllerElements;
}
///
public override UxrControllerInputCapabilities GetControllerCapabilities(UxrHandSide handSide)
{
return UxrControllerInputCapabilities.HapticImpulses;
}
#endregion
}
}