OpenVRCosmosBinding.h (8409B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #ifndef GFX_VR_BLINDING_OPENVRCOSMOSBINDING_H 8 #define GFX_VR_BLINDING_OPENVRCOSMOSBINDING_H 9 10 namespace mozilla { 11 namespace gfx { 12 13 struct OpenVRCosmosBinding { 14 const char* binding = 15 // clang-format off 16 "{\n" 17 " \"version\" : \"0.1\", \n" 18 " \"controller_type\" : \"vive_cosmos_controller\", \n" 19 " \"description\" : \"Bindings for Firefox OpenVR for the Vive Cosmos controller\", \n" 20 " \"name\" : \"Firefox bindings for Vive Cosmos Controller\", \n" 21 " \"bindings\" : { \n" 22 " \"/actions/firefox\" : { \n" 23 " \"poses\" : [ \n" 24 " { \n" 25 " \"output\" : \"/actions/firefox/in/LHand_pose\", \n" 26 " \"path\" : \"/user/hand/left/pose/raw\" \n" 27 " },\n" 28 " { \n" 29 " \"output\" : \"/actions/firefox/in/RHand_pose\", \n" 30 " \"path\" : \"/user/hand/right/pose/raw\" \n" 31 " }\n" 32 " ],\n" 33 " \"haptics\" : [ \n" 34 " {\n" 35 " \"output\" : \"/actions/firefox/out/LHand_haptic\", \n" 36 " \"path\" : \"/user/hand/left/output/haptic\" \n" 37 " },\n" 38 " { \n" 39 " \"output\" : \"/actions/firefox/out/RHand_haptic\", \n" 40 " \"path\" : \"/user/hand/right/output/haptic\" \n" 41 " }\n" 42 " ],\n" 43 " \"sources\" : [ \n" 44 " {\n" 45 " \"inputs\" : { \n" 46 " \"pull\" : { \n" 47 " \"output\" : \"/actions/firefox/in/LHand_trigger_value\" \n" 48 " } \n" 49 " },\n" 50 " \"mode\" : \"trigger\", \n" 51 " \"path\" : \"/user/hand/left/input/trigger\" \n" 52 " }, \n" 53 " {\n" 54 " \"inputs\" : { \n" 55 " \"pull\" : { \n" 56 " \"output\" : \"/actions/firefox/in/RHand_trigger_value\" \n" 57 " } \n" 58 " },\n" 59 " \"mode\" : \"trigger\", \n" 60 " \"path\" : \"/user/hand/right/input/trigger\" \n" 61 " }, \n" 62 " {\n" 63 " \"inputs\" : { \n" 64 " \"click\" : { \n" 65 " \"output\" : \"/actions/firefox/in/LHand_grip_pressed\" \n" 66 " }, \n" 67 " \"touch\" : { \n" 68 " \"output\" : \"/actions/firefox/in/LHand_grip_touched\" \n" 69 " } \n" 70 " }, \n" 71 " \"mode\" : \"button\", \n" 72 " \"path\" : \"/user/hand/left/input/grip\" \n" 73 " }, \n" 74 " {\n" 75 " \"inputs\" : { \n" 76 " \"click\" : { \n" 77 " \"output\" : \"/actions/firefox/in/RHand_grip_pressed\" \n" 78 " }, \n" 79 " \"touch\" : { \n" 80 " \"output\" : \"/actions/firefox/in/RHand_grip_touched\" \n" 81 " } \n" 82 " }, \n" 83 " \"mode\" : \"button\", \n" 84 " \"path\" : \"/user/hand/right/input/grip\" \n" 85 " }, \n" 86 " {\n" 87 " \"inputs\" : { \n" 88 " \"click\" : { \n" 89 " \"output\" : \"/actions/firefox/in/LHand_system_pressed\" \n" 90 " }, \n" 91 " \"touch\" : { \n" 92 " \"output\" : \"/actions/firefox/in/LHand_system_touched\" \n" 93 " } \n" 94 " },\n" 95 " \"mode\" : \"button\", \n" 96 " \"path\" : \"/user/hand/left/input/system\" \n" 97 " }, \n" 98 " {\n" 99 " \"inputs\" : { \n" 100 " \"click\" : { \n" 101 " \"output\" : \"/actions/firefox/in/RHand_system_pressed\" \n" 102 " }, \n" 103 " \"touch\" : { \n" 104 " \"output\" : \"/actions/firefox/in/RHand_system_touched\" \n" 105 " } \n" 106 " },\n" 107 " \"mode\" : \"button\", \n" 108 " \"path\" : \"/user/hand/right/input/system\" \n" 109 " }, \n" 110 " {\n" 111 " \"inputs\" : { \n" 112 " \"click\" : { \n" 113 " \"output\" : \"/actions/firefox/in/LHand_a_pressed\" \n" 114 " } \n" 115 " },\n" 116 " \"mode\" : \"button\", \n" 117 " \"path\" : \"/user/hand/left/input/x\" \n" 118 " }, \n" 119 " {\n" 120 " \"inputs\" : { \n" 121 " \"click\" : { \n" 122 " \"output\" : \"/actions/firefox/in/RHand_a_pressed\" \n" 123 " } \n" 124 " },\n" 125 " \"mode\" : \"button\", \n" 126 " \"path\" : \"/user/hand/right/input/a\" \n" 127 " }, \n" 128 " {\n" 129 " \"inputs\" : { \n" 130 " \"click\" : { \n" 131 " \"output\" : \"/actions/firefox/in/LHand_b_pressed\" \n" 132 " } \n" 133 " },\n" 134 " \"mode\" : \"button\", \n" 135 " \"path\" : \"/user/hand/left/input/y\" \n" 136 " }, \n" 137 " {\n" 138 " \"inputs\" : { \n" 139 " \"click\" : { \n" 140 " \"output\" : \"/actions/firefox/in/RHand_b_pressed\" \n" 141 " } \n" 142 " },\n" 143 " \"mode\" : \"button\", \n" 144 " \"path\" : \"/user/hand/right/input/b\" \n" 145 " }, \n" 146 " {\n" 147 " \"inputs\" : { \n" 148 " \"position\" : { \n" 149 " \"output\" : \"/actions/firefox/in/LHand_thumbstick_analog\" \n" 150 " }, \n" 151 " \"click\" : { \n" 152 " \"output\" : \"/actions/firefox/in/LHand_thumbstick_pressed\" \n" 153 " }, \n" 154 " \"touch\" : { \n" 155 " \"output\" : \"/actions/firefox/in/LHand_thumbstick_touched\" \n" 156 " } \n" 157 " }, \n" 158 " \"mode\" : \"joystick\", \n" 159 " \"path\" : \"/user/hand/left/input/joystick\" \n" 160 " },\n" 161 " {\n" 162 " \"inputs\" : { \n" 163 " \"position\" : { \n" 164 " \"output\" : \"/actions/firefox/in/RHand_thumbstick_analog\" \n" 165 " }, \n" 166 " \"click\" : { \n" 167 " \"output\" : \"/actions/firefox/in/RHand_thumbstick_pressed\" \n" 168 " }, \n" 169 " \"touch\" : { \n" 170 " \"output\" : \"/actions/firefox/in/RHand_thumbstick_touched\" \n" 171 " } \n" 172 " }, \n" 173 " \"mode\" : \"joystick\", \n" 174 " \"path\" : \"/user/hand/right/input/joystick\" \n" 175 " }, \n" 176 " {\n" 177 " \"inputs\" : { \n" 178 " \"click\" : { \n" 179 " \"output\" : \"/actions/firefox/in/LHand_bumper_pressed\" \n" 180 " } \n" 181 " },\n" 182 " \"mode\" : \"button\", \n" 183 " \"path\" : \"/user/hand/left/input/bumper\" \n" 184 " }, \n" 185 " {\n" 186 " \"inputs\" : { \n" 187 " \"click\" : { \n" 188 " \"output\" : \"/actions/firefox/in/RHand_bumper_pressed\" \n" 189 " } \n" 190 " },\n" 191 " \"mode\" : \"button\", \n" 192 " \"path\" : \"/user/hand/right/input/bumper\" \n" 193 " } \n" 194 " ]\n" 195 " }\n" 196 " }\n" 197 "}"; 198 // clang-format on 199 }; 200 201 } // namespace gfx 202 } // namespace mozilla 203 204 #endif // GFX_VR_BLINDING_OPENVRCOSMOSBINDING_H