// -------------------------------------------------------------------------------------------------------------------- // // Copyright (c) VRMADA, All rights reserved. // // -------------------------------------------------------------------------------------------------------------------- using System.Collections.Generic; using UltimateXR.Core; using UltimateXR.Devices.Integrations.SteamVR; namespace UltimateXR.Devices.Integrations.HTC { /// /// HTC Vive Cosmos controllers input using SteamVR. /// public class UxrHtcViveCosmosInput : UxrSteamVRControllerInput { #region Public Overrides UxrSteamVRControllerInput /// public override IEnumerable ControllerNames { get { yield return ControllerNameHtcViveCosmos; } } #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.Bumper | // Bumper UxrControllerElements.Trigger | // Trigger UxrControllerElements.Button1 | // Button A/X UxrControllerElements.Button2 | // Button B/Y UxrControllerElements.DPad); // Joystick return (validElements & (uint)controllerElements) == (uint)controllerElements; } /// public override UxrControllerInputCapabilities GetControllerCapabilities(UxrHandSide handSide) { return UxrControllerInputCapabilities.HapticImpulses; } #endregion #region Private Types & Data private const string ControllerNameHtcViveCosmos = "vive_cosmos_controller"; #endregion } }