11// Copyright (c) Microsoft Corporation. All rights reserved.
22// Licensed under the MIT License. See LICENSE in the project root for license information.
33
4+ using Microsoft . MixedReality . Toolkit . Internal . Definitions . Utilities ;
45using Microsoft . MixedReality . Toolkit . Internal . Utilities ;
56using NUnit . Framework ;
67
@@ -11,16 +12,16 @@ public class UnityInputManagerHelperTests
1112 [ Test ]
1213 public void Test01_TestAddCustomMappings ( )
1314 {
14- InputMappingAxisUtility . InputManagerAxis [ ] OpenVRControllerAxisMappings =
15+ InputManagerAxis [ ] OpenVRControllerAxisMappings =
1516 {
16- new InputMappingAxisUtility . InputManagerAxis ( ) { Name = "OPENVR_TOUCHPAD_LEFT_CONTROLLER_HORIZONTAL" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputMappingAxisUtility . MappingAxisType . JoystickAxis , Axis = 1 } ,
17- new InputMappingAxisUtility . InputManagerAxis ( ) { Name = "OPENVR_TOUCHPAD_LEFT_CONTROLLER_VERTICAL" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputMappingAxisUtility . MappingAxisType . JoystickAxis , Axis = 2 } ,
18- new InputMappingAxisUtility . InputManagerAxis ( ) { Name = "OPENVR_TOUCHPAD_RIGHT_CONTROLLER_HORIZONTAL" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputMappingAxisUtility . MappingAxisType . JoystickAxis , Axis = 4 } ,
19- new InputMappingAxisUtility . InputManagerAxis ( ) { Name = "OPENVR_TOUCHPAD_RIGHT_CONTROLLER_VERTICAL" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputMappingAxisUtility . MappingAxisType . JoystickAxis , Axis = 5 } ,
20- new InputMappingAxisUtility . InputManagerAxis ( ) { Name = "OPENVR_TRIGGER_LEFT_CONTROLLER" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputMappingAxisUtility . MappingAxisType . JoystickAxis , Axis = 9 } ,
21- new InputMappingAxisUtility . InputManagerAxis ( ) { Name = "OPENVR_TRIGGER_RIGHT_CONTROLLER" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputMappingAxisUtility . MappingAxisType . JoystickAxis , Axis = 10 } ,
22- new InputMappingAxisUtility . InputManagerAxis ( ) { Name = "OPENVR_GRIP_LEFT_CONTROLLER" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputMappingAxisUtility . MappingAxisType . JoystickAxis , Axis = 11 } ,
23- new InputMappingAxisUtility . InputManagerAxis ( ) { Name = "OPENVR_GRIP_RIGHT_CONTROLLER" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputMappingAxisUtility . MappingAxisType . JoystickAxis , Axis = 12 }
17+ new InputManagerAxis ( ) { Name = "OPENVR_TOUCHPAD_LEFT_CONTROLLER_HORIZONTAL" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputManagerAxisType . JoystickAxis , Axis = 1 } ,
18+ new InputManagerAxis ( ) { Name = "OPENVR_TOUCHPAD_LEFT_CONTROLLER_VERTICAL" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputManagerAxisType . JoystickAxis , Axis = 2 } ,
19+ new InputManagerAxis ( ) { Name = "OPENVR_TOUCHPAD_RIGHT_CONTROLLER_HORIZONTAL" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputManagerAxisType . JoystickAxis , Axis = 4 } ,
20+ new InputManagerAxis ( ) { Name = "OPENVR_TOUCHPAD_RIGHT_CONTROLLER_VERTICAL" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputManagerAxisType . JoystickAxis , Axis = 5 } ,
21+ new InputManagerAxis ( ) { Name = "OPENVR_TRIGGER_LEFT_CONTROLLER" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputManagerAxisType . JoystickAxis , Axis = 9 } ,
22+ new InputManagerAxis ( ) { Name = "OPENVR_TRIGGER_RIGHT_CONTROLLER" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputManagerAxisType . JoystickAxis , Axis = 10 } ,
23+ new InputManagerAxis ( ) { Name = "OPENVR_GRIP_LEFT_CONTROLLER" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputManagerAxisType . JoystickAxis , Axis = 11 } ,
24+ new InputManagerAxis ( ) { Name = "OPENVR_GRIP_RIGHT_CONTROLLER" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputManagerAxisType . JoystickAxis , Axis = 12 }
2425 } ;
2526
2627 InputMappingAxisUtility . ApplyMappings ( OpenVRControllerAxisMappings ) ;
@@ -38,16 +39,16 @@ public void Test01_TestAddCustomMappings()
3839 [ Test ]
3940 public void Test02_TestRemoveCustomMappings ( )
4041 {
41- InputMappingAxisUtility . InputManagerAxis [ ] OpenVRControllerAxisMappings =
42+ InputManagerAxis [ ] OpenVRControllerAxisMappings =
4243 {
43- new InputMappingAxisUtility . InputManagerAxis ( ) { Name = "OPENVR_TOUCHPAD_LEFT_CONTROLLER_HORIZONTAL" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputMappingAxisUtility . MappingAxisType . JoystickAxis , Axis = 1 } ,
44- new InputMappingAxisUtility . InputManagerAxis ( ) { Name = "OPENVR_TOUCHPAD_LEFT_CONTROLLER_VERTICAL" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputMappingAxisUtility . MappingAxisType . JoystickAxis , Axis = 2 } ,
45- new InputMappingAxisUtility . InputManagerAxis ( ) { Name = "OPENVR_TOUCHPAD_RIGHT_CONTROLLER_HORIZONTAL" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputMappingAxisUtility . MappingAxisType . JoystickAxis , Axis = 4 } ,
46- new InputMappingAxisUtility . InputManagerAxis ( ) { Name = "OPENVR_TOUCHPAD_RIGHT_CONTROLLER_VERTICAL" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputMappingAxisUtility . MappingAxisType . JoystickAxis , Axis = 5 } ,
47- new InputMappingAxisUtility . InputManagerAxis ( ) { Name = "OPENVR_TRIGGER_LEFT_CONTROLLER" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputMappingAxisUtility . MappingAxisType . JoystickAxis , Axis = 9 } ,
48- new InputMappingAxisUtility . InputManagerAxis ( ) { Name = "OPENVR_TRIGGER_RIGHT_CONTROLLER" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputMappingAxisUtility . MappingAxisType . JoystickAxis , Axis = 10 } ,
49- new InputMappingAxisUtility . InputManagerAxis ( ) { Name = "OPENVR_GRIP_LEFT_CONTROLLER" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputMappingAxisUtility . MappingAxisType . JoystickAxis , Axis = 11 } ,
50- new InputMappingAxisUtility . InputManagerAxis ( ) { Name = "OPENVR_GRIP_RIGHT_CONTROLLER" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputMappingAxisUtility . MappingAxisType . JoystickAxis , Axis = 12 }
44+ new InputManagerAxis ( ) { Name = "OPENVR_TOUCHPAD_LEFT_CONTROLLER_HORIZONTAL" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputManagerAxisType . JoystickAxis , Axis = 1 } ,
45+ new InputManagerAxis ( ) { Name = "OPENVR_TOUCHPAD_LEFT_CONTROLLER_VERTICAL" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputManagerAxisType . JoystickAxis , Axis = 2 } ,
46+ new InputManagerAxis ( ) { Name = "OPENVR_TOUCHPAD_RIGHT_CONTROLLER_HORIZONTAL" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputManagerAxisType . JoystickAxis , Axis = 4 } ,
47+ new InputManagerAxis ( ) { Name = "OPENVR_TOUCHPAD_RIGHT_CONTROLLER_VERTICAL" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputManagerAxisType . JoystickAxis , Axis = 5 } ,
48+ new InputManagerAxis ( ) { Name = "OPENVR_TRIGGER_LEFT_CONTROLLER" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputManagerAxisType . JoystickAxis , Axis = 9 } ,
49+ new InputManagerAxis ( ) { Name = "OPENVR_TRIGGER_RIGHT_CONTROLLER" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputManagerAxisType . JoystickAxis , Axis = 10 } ,
50+ new InputManagerAxis ( ) { Name = "OPENVR_GRIP_LEFT_CONTROLLER" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputManagerAxisType . JoystickAxis , Axis = 11 } ,
51+ new InputManagerAxis ( ) { Name = "OPENVR_GRIP_RIGHT_CONTROLLER" , Dead = 0.001f , Sensitivity = 1 , Invert = false , Type = InputManagerAxisType . JoystickAxis , Axis = 12 }
5152 } ;
5253
5354 InputMappingAxisUtility . RemoveMappings ( OpenVRControllerAxisMappings ) ;
0 commit comments