Skip to content

Commit e738595

Browse files
Merge branch 'vNEXT-TouchScreenInputSourceUpdate' into vNEXT-SpatialMouse
# Conflicts: # Assets/MixedRealityToolkit-SDK/Profiles/DefaultMixedRealityControllerMappingProfile.asset # Assets/MixedRealityToolkit-SDK/Profiles/DefaultMixedRealityInputActionsProfile.asset
2 parents be250ad + 0439749 commit e738595

File tree

82 files changed

+1674
-533
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1674
-533
lines changed

Assets/MixedRealityToolkit-SDK/Features/Input/MixedRealityInputManager.cs

Lines changed: 171 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,177 @@ public void RaisePoseInputChanged(IMixedRealityInputSource source, Handedness ha
11271127

11281128
#endregion Generic Input Events
11291129

1130-
#region Gestures
1130+
#region Gesture Events
1131+
1132+
private static readonly ExecuteEvents.EventFunction<IMixedRealityGestureHandler> OnGestureStarted =
1133+
delegate (IMixedRealityGestureHandler handler, BaseEventData eventData)
1134+
{
1135+
var casted = ExecuteEvents.ValidateEventData<InputEventData>(eventData);
1136+
handler.OnGestureStarted(casted);
1137+
};
1138+
1139+
/// <inheritdoc />
1140+
public void RaiseGestureStarted(IMixedRealityController controller, MixedRealityInputAction action)
1141+
{
1142+
inputEventData.Initialize(controller.InputSource, controller.ControllerHandedness, action);
1143+
HandleEvent(inputEventData, OnGestureStarted);
1144+
}
1145+
1146+
private static readonly ExecuteEvents.EventFunction<IMixedRealityGestureHandler> OnGestureUpdated =
1147+
delegate (IMixedRealityGestureHandler handler, BaseEventData eventData)
1148+
{
1149+
var casted = ExecuteEvents.ValidateEventData<InputEventData>(eventData);
1150+
handler.OnGestureUpdated(casted);
1151+
};
1152+
1153+
/// <inheritdoc />
1154+
public void RaiseGestureUpdated(IMixedRealityController controller, MixedRealityInputAction action)
1155+
{
1156+
inputEventData.Initialize(controller.InputSource, controller.ControllerHandedness, action);
1157+
HandleEvent(inputEventData, OnGestureUpdated);
1158+
}
1159+
1160+
private static readonly ExecuteEvents.EventFunction<IMixedRealityGestureHandler<Vector2>> OnGestureVector2PositionUpdated =
1161+
delegate (IMixedRealityGestureHandler<Vector2> handler, BaseEventData eventData)
1162+
{
1163+
var casted = ExecuteEvents.ValidateEventData<InputEventData<Vector2>>(eventData);
1164+
handler.OnGestureUpdated(casted);
1165+
};
1166+
1167+
/// <inheritdoc />
1168+
public void RaiseGestureUpdated(IMixedRealityController controller, MixedRealityInputAction action, Vector2 inputData)
1169+
{
1170+
vector2InputEventData.Initialize(controller.InputSource, controller.ControllerHandedness, action, inputData);
1171+
HandleEvent(vector2InputEventData, OnGestureVector2PositionUpdated);
1172+
}
1173+
1174+
private static readonly ExecuteEvents.EventFunction<IMixedRealityGestureHandler<Vector3>> OnGesturePositionUpdated =
1175+
delegate (IMixedRealityGestureHandler<Vector3> handler, BaseEventData eventData)
1176+
{
1177+
var casted = ExecuteEvents.ValidateEventData<InputEventData<Vector3>>(eventData);
1178+
handler.OnGestureUpdated(casted);
1179+
};
1180+
1181+
/// <inheritdoc />
1182+
public void RaiseGestureUpdated(IMixedRealityController controller, MixedRealityInputAction action, Vector3 inputData)
1183+
{
1184+
positionInputEventData.Initialize(controller.InputSource, controller.ControllerHandedness, action, inputData);
1185+
HandleEvent(inputEventData, OnGesturePositionUpdated);
1186+
}
1187+
1188+
private static readonly ExecuteEvents.EventFunction<IMixedRealityGestureHandler<Quaternion>> OnGestureRotationUpdated =
1189+
delegate (IMixedRealityGestureHandler<Quaternion> handler, BaseEventData eventData)
1190+
{
1191+
var casted = ExecuteEvents.ValidateEventData<InputEventData<Quaternion>>(eventData);
1192+
handler.OnGestureUpdated(casted);
1193+
};
1194+
1195+
/// <inheritdoc />
1196+
public void RaiseGestureUpdated(IMixedRealityController controller, MixedRealityInputAction action, Quaternion inputData)
1197+
{
1198+
rotationInputEventData.Initialize(controller.InputSource, controller.ControllerHandedness, action, inputData);
1199+
HandleEvent(inputEventData, OnGestureRotationUpdated);
1200+
}
1201+
1202+
private static readonly ExecuteEvents.EventFunction<IMixedRealityGestureHandler<MixedRealityPose>> OnGesturePoseUpdated =
1203+
delegate (IMixedRealityGestureHandler<MixedRealityPose> handler, BaseEventData eventData)
1204+
{
1205+
var casted = ExecuteEvents.ValidateEventData<InputEventData<MixedRealityPose>>(eventData);
1206+
handler.OnGestureUpdated(casted);
1207+
};
1208+
1209+
/// <inheritdoc />
1210+
public void RaiseGestureUpdated(IMixedRealityController controller, MixedRealityInputAction action, MixedRealityPose inputData)
1211+
{
1212+
poseInputEventData.Initialize(controller.InputSource, controller.ControllerHandedness, action, inputData);
1213+
HandleEvent(inputEventData, OnGesturePoseUpdated);
1214+
}
1215+
1216+
private static readonly ExecuteEvents.EventFunction<IMixedRealityGestureHandler> OnGestureCompleted =
1217+
delegate (IMixedRealityGestureHandler handler, BaseEventData eventData)
1218+
{
1219+
var casted = ExecuteEvents.ValidateEventData<InputEventData>(eventData);
1220+
handler.OnGestureCompleted(casted);
1221+
};
1222+
1223+
/// <inheritdoc />
1224+
public void RaiseGestureCompleted(IMixedRealityController controller, MixedRealityInputAction action)
1225+
{
1226+
inputEventData.Initialize(controller.InputSource, controller.ControllerHandedness, action);
1227+
HandleEvent(inputEventData, OnGestureCompleted);
1228+
}
1229+
1230+
private static readonly ExecuteEvents.EventFunction<IMixedRealityGestureHandler<Vector2>> OnGestureVector2PositionCompleted =
1231+
delegate (IMixedRealityGestureHandler<Vector2> handler, BaseEventData eventData)
1232+
{
1233+
var casted = ExecuteEvents.ValidateEventData<InputEventData<Vector2>>(eventData);
1234+
handler.OnGestureCompleted(casted);
1235+
};
1236+
1237+
/// <inheritdoc />
1238+
public void RaiseGestureCompleted(IMixedRealityController controller, MixedRealityInputAction action, Vector2 inputData)
1239+
{
1240+
vector2InputEventData.Initialize(controller.InputSource, controller.ControllerHandedness, action, inputData);
1241+
HandleEvent(vector2InputEventData, OnGestureVector2PositionCompleted);
1242+
}
1243+
1244+
private static readonly ExecuteEvents.EventFunction<IMixedRealityGestureHandler<Vector3>> OnGesturePositionCompleted =
1245+
delegate (IMixedRealityGestureHandler<Vector3> handler, BaseEventData eventData)
1246+
{
1247+
var casted = ExecuteEvents.ValidateEventData<InputEventData<Vector3>>(eventData);
1248+
handler.OnGestureCompleted(casted);
1249+
};
1250+
1251+
/// <inheritdoc />
1252+
public void RaiseGestureCompleted(IMixedRealityController controller, MixedRealityInputAction action, Vector3 inputData)
1253+
{
1254+
positionInputEventData.Initialize(controller.InputSource, controller.ControllerHandedness, action, inputData);
1255+
HandleEvent(inputEventData, OnGesturePositionCompleted);
1256+
}
1257+
1258+
private static readonly ExecuteEvents.EventFunction<IMixedRealityGestureHandler<Quaternion>> OnGestureRotationCompleted =
1259+
delegate (IMixedRealityGestureHandler<Quaternion> handler, BaseEventData eventData)
1260+
{
1261+
var casted = ExecuteEvents.ValidateEventData<InputEventData<Quaternion>>(eventData);
1262+
handler.OnGestureCompleted(casted);
1263+
};
1264+
1265+
/// <inheritdoc />
1266+
public void RaiseGestureCompleted(IMixedRealityController controller, MixedRealityInputAction action, Quaternion inputData)
1267+
{
1268+
rotationInputEventData.Initialize(controller.InputSource, controller.ControllerHandedness, action, inputData);
1269+
HandleEvent(inputEventData, OnGestureRotationCompleted);
1270+
}
1271+
1272+
private static readonly ExecuteEvents.EventFunction<IMixedRealityGestureHandler<MixedRealityPose>> OnGesturePoseCompleted =
1273+
delegate (IMixedRealityGestureHandler<MixedRealityPose> handler, BaseEventData eventData)
1274+
{
1275+
var casted = ExecuteEvents.ValidateEventData<InputEventData<MixedRealityPose>>(eventData);
1276+
handler.OnGestureCompleted(casted);
1277+
};
1278+
1279+
/// <inheritdoc />
1280+
public void RaiseGestureCompleted(IMixedRealityController controller, MixedRealityInputAction action, MixedRealityPose inputData)
1281+
{
1282+
poseInputEventData.Initialize(controller.InputSource, controller.ControllerHandedness, action, inputData);
1283+
HandleEvent(inputEventData, OnGesturePoseCompleted);
1284+
}
1285+
1286+
private static readonly ExecuteEvents.EventFunction<IMixedRealityGestureHandler> OnGestureCanceled =
1287+
delegate (IMixedRealityGestureHandler handler, BaseEventData eventData)
1288+
{
1289+
var casted = ExecuteEvents.ValidateEventData<InputEventData>(eventData);
1290+
handler.OnGestureCanceled(casted);
1291+
};
1292+
1293+
/// <inheritdoc />
1294+
public void RaiseGestureCanceled(IMixedRealityController controller, MixedRealityInputAction action)
1295+
{
1296+
inputEventData.Initialize(controller.InputSource, controller.ControllerHandedness, action);
1297+
HandleEvent(inputEventData, OnGestureCanceled);
1298+
}
1299+
1300+
#endregion Gesture Events
11311301

11321302
#region Hold Events
11331303

@@ -1438,8 +1608,6 @@ public void RaiseManipulationCanceled(IMixedRealityInputSource source, Handednes
14381608

14391609
#endregion Manipulation Events
14401610

1441-
#endregion Gestures
1442-
14431611
#region Speech Keyword Events
14441612

14451613
private static readonly ExecuteEvents.EventFunction<IMixedRealitySpeechHandler> OnSpeechKeywordRecognizedEventHandler =

Assets/MixedRealityToolkit-SDK/Features/Utilities.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/MixedRealityToolkit/_Core/Utilities/Physics/Solvers.meta renamed to Assets/MixedRealityToolkit-SDK/Features/Utilities/Solvers.meta

File renamed without changes.

Assets/MixedRealityToolkit/_Core/Utilities/Physics/Solvers/ConstantViewSize.cs renamed to Assets/MixedRealityToolkit-SDK/Features/Utilities/Solvers/ConstantViewSize.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
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.Core.Utilities;
45
using UnityEngine;
56

6-
namespace Microsoft.MixedReality.Toolkit.Core.Utilities.Physics.Solvers
7+
namespace Microsoft.MixedReality.Toolkit.SDK.Utilities.Solvers
78
{
89
/// <summary>
910
/// ConstantViewSize solver scales to maintain a constant size relative to the view (currently tied to the Camera)

Assets/MixedRealityToolkit/_Core/Utilities/Physics/Solvers/ConstantViewSize.cs.meta renamed to Assets/MixedRealityToolkit-SDK/Features/Utilities/Solvers/ConstantViewSize.cs.meta

File renamed without changes.

Assets/MixedRealityToolkit/_Core/Utilities/Physics/Solvers/Momentum.cs renamed to Assets/MixedRealityToolkit-SDK/Features/Utilities/Solvers/Momentum.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
using UnityEngine;
55

6-
namespace Microsoft.MixedReality.Toolkit.Core.Utilities.Physics.Solvers
6+
namespace Microsoft.MixedReality.Toolkit.SDK.Utilities.Solvers
77
{
88
/// <summary>
99
/// Applies acceleration/velocity/friction to simulate momentum for an object being moved by other solvers/components

Assets/MixedRealityToolkit/_Core/Utilities/Physics/Solvers/Momentum.cs.meta renamed to Assets/MixedRealityToolkit-SDK/Features/Utilities/Solvers/Momentum.cs.meta

File renamed without changes.

Assets/MixedRealityToolkit/_Core/Utilities/Physics/Solvers/Orbital.cs renamed to Assets/MixedRealityToolkit-SDK/Features/Utilities/Solvers/Orbital.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
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.Core.Utilities;
45
using UnityEngine;
56

6-
namespace Microsoft.MixedReality.Toolkit.Core.Utilities.Physics.Solvers
7+
namespace Microsoft.MixedReality.Toolkit.SDK.Utilities.Solvers
78
{
89
/// <summary>
910
/// Provides a solver that follows the TrackedObject/TargetTransform in an orbital motion.

Assets/MixedRealityToolkit/_Core/Utilities/Physics/Solvers/Orbital.cs.meta renamed to Assets/MixedRealityToolkit-SDK/Features/Utilities/Solvers/Orbital.cs.meta

File renamed without changes.

Assets/MixedRealityToolkit/_Core/Utilities/Physics/Solvers/RadialView.cs renamed to Assets/MixedRealityToolkit-SDK/Features/Utilities/Solvers/RadialView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
using UnityEngine;
55

6-
namespace Microsoft.MixedReality.Toolkit.Core.Utilities.Physics.Solvers
6+
namespace Microsoft.MixedReality.Toolkit.SDK.Utilities.Solvers
77
{
88
/// <summary>
99
/// RadialViewPoser solver locks a tag-along type object within a view cone

0 commit comments

Comments
 (0)