Skip to content

Commit 53c7d50

Browse files
committed
Implement XRSDKWindowsMixedRealityUtilitiesProvider
1 parent 2e07623 commit 53c7d50

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

Assets/MixedRealityToolkit.Providers/WindowsMixedReality/XR2018/WindowsMixedRealityUtilitiesProvider.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
namespace Microsoft.MixedReality.Toolkit.WindowsMixedReality
1212
{
13+
/// <summary>
14+
/// An implementation of <see cref="IWindowsMixedRealityUtilitiesProvider"/> for Unity's in-box XR pipeline.
15+
/// </summary>
1316
public class WindowsMixedRealityUtilitiesProvider : IWindowsMixedRealityUtilitiesProvider
1417
{
1518
/// <inheritdoc />
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
using Microsoft.MixedReality.Toolkit.WindowsMixedReality;
5+
using System;
6+
7+
#if WMR_ENABLED
8+
using UnityEngine.XR.WindowsMR;
9+
#endif // WMR_ENABLED
10+
11+
namespace Microsoft.MixedReality.Toolkit.XRSDK.WindowsMixedReality
12+
{
13+
/// <summary>
14+
/// An implementation of <see cref="Toolkit.WindowsMixedReality.IWindowsMixedRealityUtilitiesProvider"/> for Unity's XR SDK pipeline.
15+
/// </summary>
16+
public class XRSDKWindowsMixedRealityUtilitiesProvider : IWindowsMixedRealityUtilitiesProvider
17+
{
18+
/// <inheritdoc />
19+
IntPtr IWindowsMixedRealityUtilitiesProvider.ISpatialCoordinateSystemPtr =>
20+
#if WMR_ENABLED
21+
WindowsMREnvironment.OriginSpatialCoordinateSystem;
22+
#else
23+
IntPtr.Zero;
24+
#endif
25+
26+
/// <inheritdoc />
27+
IntPtr IWindowsMixedRealityUtilitiesProvider.IHolographicFramePtr
28+
{
29+
get
30+
{
31+
// NOTE: Currently unable to access HolographicFrame in XR SDK.
32+
return IntPtr.Zero;
33+
}
34+
}
35+
}
36+
}

Assets/MixedRealityToolkit.Providers/WindowsMixedReality/XRSDK/XRSDKWindowsMixedRealityUtilitiesProvider.cs.meta

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

0 commit comments

Comments
 (0)