Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Commit

Permalink
Remove obsolete SetupDefaultInteractions (#515)
Browse files Browse the repository at this point in the history
  • Loading branch information
FejZa authored Apr 11, 2020
1 parent dde9dc0 commit 27a6ef9
Show file tree
Hide file tree
Showing 14 changed files with 0 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,6 @@ protected BaseController(IMixedRealityControllerDataProvider controllerDataProvi
/// </summary>
public virtual void UpdateController() { }

/// <summary>
/// Assign the default interactions based on controller handedness if necessary.
/// </summary>
/// <param name="controllerHandedness">The handedness of the controller.</param>
public abstract void SetupDefaultInteractions(Handedness controllerHandedness);

/// <summary>
/// Load the Interaction mappings for this controller from the configured Controller Mapping profile
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using XRTK.Definitions.Controllers.Hands;
using XRTK.Definitions.Devices;
using XRTK.Definitions.Utilities;
using XRTK.Interfaces.InputSystem;
using XRTK.Interfaces.Providers.Controllers;
using XRTK.Interfaces.Providers.Controllers.Hands;
using XRTK.Services;
Expand Down Expand Up @@ -392,9 +391,6 @@ public bool TryGetBounds(TrackedHandBounds handBounds, out Bounds[] newBounds)
return false;
}

/// <inheritdoc />
public override void SetupDefaultInteractions(Handedness controllerHandedness) { }

/// <inheritdoc />
public virtual bool TryGetJointPose(TrackedHandJoint joint, out MixedRealityPose pose) => jointPoses.TryGetValue(joint, out pose);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,6 @@ public override MixedRealityInteractionMapping[] DefaultRightHandedInteractions
}
}

/// <inheritdoc />
public override void SetupDefaultInteractions(Handedness controllerHandedness)
{
AssignControllerMappings(controllerHandedness == Handedness.Left ? DefaultLeftHandedInteractions : DefaultRightHandedInteractions);
}

/// <inheritdoc />
public override void UpdateController()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,5 @@ public OculusGoOpenVRController(IMixedRealityControllerDataProvider controllerDa
new MixedRealityInteractionMapping("PrimaryTouchpad Click", AxisType.Digital, DeviceInputType.TouchpadPress, KeyCode.JoystickButton9),
new MixedRealityInteractionMapping("PrimaryTouchpad Axis", AxisType.DualAxis, DeviceInputType.DirectionalPad, ControllerMappingLibrary.AXIS_4, ControllerMappingLibrary.AXIS_5)
};

/// <inheritdoc />
public override void SetupDefaultInteractions(Handedness controllerHandedness)
{
AssignControllerMappings(DefaultInteractions);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,5 @@ public OculusRemoteOpenVRController(IMixedRealityControllerDataProvider controll
new MixedRealityInteractionMapping("Button.One", AxisType.Digital, DeviceInputType.ButtonPress, KeyCode.JoystickButton0),
new MixedRealityInteractionMapping("Button.Two", AxisType.Digital, DeviceInputType.ButtonPress, KeyCode.JoystickButton1),
};

/// <inheritdoc />
public override void SetupDefaultInteractions(Handedness controllerHandedness)
{
AssignControllerMappings(DefaultInteractions);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,5 @@ public OculusTouchOpenVRController(IMixedRealityControllerDataProvider controlle
new MixedRealityInteractionMapping("Touch.SecondaryThumbRest Touch", AxisType.Digital, DeviceInputType.ThumbTouch, KeyCode.JoystickButton19),
new MixedRealityInteractionMapping("Touch.SecondaryThumbRest Near Touch", AxisType.Digital, DeviceInputType.ThumbNearTouch, ControllerMappingLibrary.AXIS_18)
};

/// <inheritdoc />
public override void SetupDefaultInteractions(Handedness controllerHandedness)
{
AssignControllerMappings(controllerHandedness == Handedness.Left ? DefaultLeftHandedInteractions : DefaultRightHandedInteractions);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,5 @@ public ViveKnucklesOpenVRController(IMixedRealityControllerDataProvider controll
new MixedRealityInteractionMapping("Ring Finger Cap Sensor", AxisType.SingleAxis, DeviceInputType.RingFinger, ControllerMappingLibrary.AXIS_25),
new MixedRealityInteractionMapping("Pinky Finger Cap Sensor", AxisType.SingleAxis, DeviceInputType.PinkyFinger, ControllerMappingLibrary.AXIS_27),
};

/// <inheritdoc />
public override void SetupDefaultInteractions(Handedness controllerHandedness)
{
AssignControllerMappings(controllerHandedness == Handedness.Left ? DefaultLeftHandedInteractions : DefaultRightHandedInteractions);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,5 @@ public ViveWandOpenVRController(IMixedRealityControllerDataProvider controllerDa
new MixedRealityInteractionMapping("Trackpad Press", AxisType.Digital, DeviceInputType.TouchpadPress, KeyCode.JoystickButton9),
new MixedRealityInteractionMapping("Menu Button", AxisType.Digital, DeviceInputType.ButtonPress, KeyCode.JoystickButton0),
};

/// <inheritdoc />
public override void SetupDefaultInteractions(Handedness controllerHandedness)
{
AssignControllerMappings(controllerHandedness == Handedness.Left ? DefaultLeftHandedInteractions : DefaultRightHandedInteractions);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,5 @@ public override MixedRealityInteractionMapping[] DefaultRightHandedInteractions
};
}
}

/// <inheritdoc />
public override void SetupDefaultInteractions(Handedness controllerHandedness)
{
AssignControllerMappings(controllerHandedness == Handedness.Left ? DefaultLeftHandedInteractions : DefaultRightHandedInteractions);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,6 @@ private Vector3 DeltaPosition
/// </summary>
public override MixedRealityInteractionMapping[] DefaultRightHandedInteractions => DefaultInteractions;

/// <inheritdoc />
public override void SetupDefaultInteractions(Handedness controllerHandedness)
{
AssignControllerMappings(DefaultInteractions);
}

/// <summary>
/// Gets the hands position in screen space.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ public GenericJoystickController(IMixedRealityControllerDataProvider controllerD
protected MixedRealityPose LastControllerPose = MixedRealityPose.ZeroIdentity;
protected MixedRealityPose CurrentControllerPose = MixedRealityPose.ZeroIdentity;

/// <inheritdoc />
public override void SetupDefaultInteractions(Handedness controllerHandedness)
{
// Generic unity controller's will not have default interactions
}

/// <summary>
/// Update the controller data from Unity's Input Manager
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ public override MixedRealityInteractionMapping[] DefaultInteractions
}
}

/// <inheritdoc />
public override void SetupDefaultInteractions(Handedness controllerHandedness)
{
AssignControllerMappings(DefaultInteractions);
}

private MixedRealityPose controllerPose = MixedRealityPose.ZeroIdentity;
private Vector2 mouseDelta;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,31 +63,6 @@ public UnityTouchController(IMixedRealityControllerDataProvider controllerDataPr
private bool isManipulating;
private MixedRealityPose lastPose = MixedRealityPose.ZeroIdentity;

/// <inheritdoc />
public override void SetupDefaultInteractions(Handedness controllerHandedness)
{
AssignControllerMappings(DefaultInteractions);

if (MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled &&
MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.GesturesProfile != null)
{
for (int i = 0; i < MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.GesturesProfile.Gestures.Length; i++)
{
var gesture = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.GesturesProfile.Gestures[i];

switch (gesture.GestureType)
{
case GestureInputType.Hold:
holdingAction = gesture.Action;
break;
case GestureInputType.Manipulation:
manipulationAction = gesture.Action;
break;
}
}
}
}

/// <summary>
/// Start the touch.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,5 @@ public override MixedRealityInteractionMapping[] DefaultInteractions
};
}
}

/// <inheritdoc />
public override void SetupDefaultInteractions(Handedness controllerHandedness)
{
AssignControllerMappings(DefaultInteractions);
}
}
}

0 comments on commit 27a6ef9

Please sign in to comment.