OpenVRViveBinding.h (6933B)
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_OPENVRVIVEBINDING_H 8 #define GFX_VR_BLINDING_OPENVRVIVEBINDING_H 9 10 namespace mozilla { 11 namespace gfx { 12 13 struct OpenVRViveBinding { 14 const char* binding = 15 // clang-format off 16 "{\n" 17 " \"version\" : \"0.1\", \n" 18 " \"controller_type\" : \"vive_controller\", \n" 19 " \"description\" : \"Bindings for Firefox OpenVR for the Vive controller\", \n" 20 " \"name\" : \"Firefox bindings for Vive 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 " \"position\" : { \n" 47 " \"output\" : \"/actions/firefox/in/LHand_trackpad_analog\" \n" 48 " }, \n" 49 " \"click\" : { \n" 50 " \"output\" : \"/actions/firefox/in/LHand_trackpad_pressed\" \n" 51 " }, \n" 52 " \"touch\" : { \n" 53 " \"output\" : \"/actions/firefox/in/LHand_trackpad_touched\" \n" 54 " } \n" 55 " }, \n" 56 " \"mode\" : \"trackpad\", \n" 57 " \"path\" : \"/user/hand/left/input/trackpad\" \n" 58 " },\n" 59 " {\n" 60 " \"inputs\" : { \n" 61 " \"position\" : { \n" 62 " \"output\" : \"/actions/firefox/in/RHand_trackpad_analog\" \n" 63 " }, \n" 64 " \"click\" : { \n" 65 " \"output\" : \"/actions/firefox/in/RHand_trackpad_pressed\" \n" 66 " }, \n" 67 " \"touch\" : { \n" 68 " \"output\" : \"/actions/firefox/in/RHand_trackpad_touched\" \n" 69 " } \n" 70 " }, \n" 71 " \"mode\" : \"trackpad\", \n" 72 " \"path\" : \"/user/hand/right/input/trackpad\" \n" 73 " }, \n" 74 " {\n" 75 " \"inputs\" : { \n" 76 " \"pull\" : { \n" 77 " \"output\" : \"/actions/firefox/in/LHand_trigger_value\" \n" 78 " } \n" 79 " },\n" 80 " \"mode\" : \"trigger\", \n" 81 " \"path\" : \"/user/hand/left/input/trigger\" \n" 82 " }, \n" 83 " {\n" 84 " \"inputs\" : { \n" 85 " \"pull\" : { \n" 86 " \"output\" : \"/actions/firefox/in/RHand_trigger_value\" \n" 87 " } \n" 88 " },\n" 89 " \"mode\" : \"trigger\", \n" 90 " \"path\" : \"/user/hand/right/input/trigger\" \n" 91 " }, \n" 92 " {\n" 93 " \"inputs\" : { \n" 94 " \"click\" : { \n" 95 " \"output\" : \"/actions/firefox/in/LHand_grip_pressed\" \n" 96 " }, \n" 97 " \"touch\" : { \n" 98 " \"output\" : \"/actions/firefox/in/LHand_grip_touched\" \n" 99 " } \n" 100 " }, \n" 101 " \"mode\" : \"button\", \n" 102 " \"path\" : \"/user/hand/left/input/grip\" \n" 103 " }, \n" 104 " {\n" 105 " \"inputs\" : { \n" 106 " \"click\" : { \n" 107 " \"output\" : \"/actions/firefox/in/RHand_grip_pressed\" \n" 108 " }, \n" 109 " \"touch\" : { \n" 110 " \"output\" : \"/actions/firefox/in/RHand_grip_touched\" \n" 111 " } \n" 112 " }, \n" 113 " \"mode\" : \"button\", \n" 114 " \"path\" : \"/user/hand/right/input/grip\" \n" 115 " }, \n" 116 " {\n" 117 " \"inputs\" : { \n" 118 " \"click\" : { \n" 119 " \"output\" : \"/actions/firefox/in/LHand_menu_pressed\" \n" 120 " }, \n" 121 " \"touch\" : { \n" 122 " \"output\" : \"/actions/firefox/in/LHand_menu_touched\" \n" 123 " } \n" 124 " },\n" 125 " \"mode\" : \"button\", \n" 126 " \"path\" : \"/user/hand/left/input/application_menu\" \n" 127 " }, \n" 128 " {\n" 129 " \"inputs\" : { \n" 130 " \"click\" : { \n" 131 " \"output\" : \"/actions/firefox/in/RHand_menu_pressed\" \n" 132 " }, \n" 133 " \"touch\" : { \n" 134 " \"output\" : \"/actions/firefox/in/RHand_menu_touched\" \n" 135 " } \n" 136 " },\n" 137 " \"mode\" : \"button\", \n" 138 " \"path\" : \"/user/hand/right/input/application_menu\" \n" 139 " }, \n" 140 " {\n" 141 " \"inputs\" : { \n" 142 " \"click\" : { \n" 143 " \"output\" : \"/actions/firefox/in/LHand_system_pressed\" \n" 144 " }, \n" 145 " \"touch\" : { \n" 146 " \"output\" : \"/actions/firefox/in/LHand_system_touched\" \n" 147 " } \n" 148 " },\n" 149 " \"mode\" : \"button\", \n" 150 " \"path\" : \"/user/hand/left/input/system\" \n" 151 " }, \n" 152 " {\n" 153 " \"inputs\" : { \n" 154 " \"click\" : { \n" 155 " \"output\" : \"/actions/firefox/in/RHand_system_pressed\" \n" 156 " }, \n" 157 " \"touch\" : { \n" 158 " \"output\" : \"/actions/firefox/in/RHand_system_touched\" \n" 159 " } \n" 160 " },\n" 161 " \"mode\" : \"button\", \n" 162 " \"path\" : \"/user/hand/right/input/system\" \n" 163 " } \n" 164 " ]\n" 165 " }\n" 166 " }\n" 167 "}"; 168 // clang-format on 169 }; 170 171 } // namespace gfx 172 } // namespace mozilla 173 174 #endif // GFX_VR_BLINDING_OPENVRVIVEBINDING_H