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

Commit

Permalink
cleaned up sdk a bit (#576)
Browse files Browse the repository at this point in the history
* cleaned up sdk a bit

Added docs and simplified interfaces

* Moved GazeProvider into core

cleaned up headers and references

* updated unit tests
  • Loading branch information
StephenHodgson authored May 9, 2020
1 parent 2110cfb commit 0f363fd
Show file tree
Hide file tree
Showing 25 changed files with 676 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ public void FromJson(string json)

#region IEqualityComparer Implementation

/// <inheritdoc />
bool IEqualityComparer.Equals(object left, object right)
{
if (left is null || right is null) { return false; }
Expand All @@ -322,16 +323,19 @@ public bool Equals(SimulatedHandControllerPose other)
return Id == other.Id;
}

/// <inheritdoc />
public override bool Equals(object obj)
{
return !(obj is null) && (obj is SimulatedHandControllerPose pose && Equals(pose));
}

/// <inheritdoc />
int IEqualityComparer.GetHashCode(object obj)
{
return obj is SimulatedHandControllerPose pose ? pose.GetHashCode() : 0;
}

/// <inheritdoc />
public override int GetHashCode()
{
return base.GetHashCode();
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Definitions/Devices/ControllerMappingLibrary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using XRTK.Definitions.Utilities;
using XRTK.Definitions.Controllers;
using XRTK.Definitions.Utilities;
using XRTK.Utilities.Editor;
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Licensed under the MIT License. See LICENSE in the project root for license information.

using UnityEngine;
using XRTK.Providers.Networking.Profiles;
using XRTK.Definitions.Utilities;
using XRTK.Providers.Networking.Profiles;

namespace XRTK.Providers.Networking.WebRTC
{
Expand Down
2 changes: 1 addition & 1 deletion Runtime/EventDatum/Input/SourcePoseEventData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Licensed under the MIT License. See LICENSE in the project root for license information.

using UnityEngine.EventSystems;
using XRTK.Interfaces.Providers.Controllers;
using XRTK.Interfaces.InputSystem;
using XRTK.Interfaces.Providers.Controllers;

namespace XRTK.EventDatum.Input
{
Expand Down
2 changes: 1 addition & 1 deletion Runtime/EventDatum/Input/SourceStateEventData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Licensed under the MIT License. See LICENSE in the project root for license information.

using UnityEngine.EventSystems;
using XRTK.Interfaces.Providers.Controllers;
using XRTK.Interfaces.InputSystem;
using XRTK.Interfaces.Providers.Controllers;

namespace XRTK.EventDatum.Input
{
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Extensions/TextureExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using XRTK.Utilities.Async;
using System.Threading.Tasks;
using UnityEngine;
using XRTK.Utilities.Async;

namespace XRTK.Extensions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@

namespace XRTK.Interfaces.InputSystem.Handlers
{
/// <summary>
/// Interface for configuring controller visualization.
/// </summary>
public interface IMixedRealityControllerVisualizer : IMixedRealityControllerPoseSynchronizer
{
/// <summary>
/// The <see cref="GameObject"/> reference for this controller.
/// The <see cref="UnityEngine.GameObject"/> reference for this controller.
/// </summary>
/// <remarks>
/// This reference may not always be available when called.
/// </remarks>
GameObject GameObjectProxy { get; }
GameObject GameObject { get; }

// TODO add defined elements or transforms?
}
Expand Down
6 changes: 3 additions & 3 deletions Runtime/Interfaces/InputSystem/IMixedRealityGazeProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace XRTK.Interfaces.InputSystem
public interface IMixedRealityGazeProvider
{
/// <summary>
/// Enable or disable the <see cref="Component"/> attached to the <see cref="GameObjectReference"/>
/// Enable or disable the <see cref="Component"/> attached to the <see cref="UnityEngine.GameObject"/>
/// </summary>
bool Enabled { get; set; }

Expand Down Expand Up @@ -73,8 +73,8 @@ public interface IMixedRealityGazeProvider
Vector3 HeadMovementDirection { get; }

/// <summary>
/// Get the GameObject reference for this Gaze Provider.
/// Get the <see cref="UnityEngine.GameObject"/> reference for this <see cref="IMixedRealityGazeProvider"/>.
/// </summary>
GameObject GameObjectReference { get; }
GameObject GameObject { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using System.Collections.Generic;
using UnityEngine;
using XRTK.Definitions.SpatialAwarenessSystem;
using XRTK.Interfaces.Providers.SpatialObservers;
using XRTK.Interfaces.Events;
using XRTK.Interfaces.Providers.SpatialObservers;
using XRTK.Interfaces.SpatialAwarenessSystem.Handlers;

namespace XRTK.Interfaces.SpatialAwarenessSystem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
using XRTK.Definitions.Controllers.Simulation.Hands;
using XRTK.Definitions.Devices;
using XRTK.Definitions.Utilities;
using XRTK.Interfaces.Providers.Controllers;
using XRTK.Interfaces.InputSystem;
using XRTK.Interfaces.Providers.Controllers;
using XRTK.Interfaces.Providers.Controllers.Hands;
using XRTK.Services;

Expand Down
Loading

0 comments on commit 0f363fd

Please sign in to comment.