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

Implement BoundaryVisibility #822

Merged
merged 5 commits into from
Apr 30, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Submodules/WindowsMixedReality
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright (c) XRTK. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

namespace XRTK.Definitions.BoundarySystem
{
/// <summary>
/// Defines available visibility state for platform boundaries used by the
/// <see cref="Interfaces.BoundarySystem.IMixedRealityBoundarySystem"/>.
/// </summary>
public enum BoundaryVisibility
{
/// <summary>
/// The boundaries visibility status is unknown. Platform boundaries visibility
/// may be unknown e.g. when the platform does not provide an API for XRTK to query
/// boundary visibility state.
/// </summary>
Unknown = 0,
/// <summary>
/// The boundaries are hidden.
/// </summary>
Hidden,
/// <summary>
/// The boundaries are visible.
/// </summary>
Visible
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
// Copyright (c) XRTK. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System.Collections.Generic;
using UnityEngine;
using System.Collections.Generic;
using XRTK.Definitions.BoundarySystem;

namespace XRTK.Interfaces.BoundarySystem
{
/// <summary>
/// Mixed Reality Toolkit boundary data provider definition, used to instantiate and manage low level api access specific devices, SDKs, and libraries.
/// Boundary data providers provide low level data access for the <see cref="IMixedRealityBoundarySystem"/> to query
/// platform boundary state.
/// </summary>
public interface IMixedRealityBoundaryDataProvider : IMixedRealityDataProvider
{
/// <summary>
/// Is the platform's boundary visible?
/// Gets the current boundary visibility.
/// </summary>
bool IsPlatformBoundaryVisible { get; set; }
BoundaryVisibility Visibility { get; }

/// <summary>
/// The the platform's boundary configured?
/// Gets whether boundaries have been configured and are active.
/// </summary>
bool IsPlatformConfigured { get; }

/// <summary>
/// Try to get the boundary geometry from the library api.
/// Tries to retrieve up to date boundary points in world space.
/// </summary>
/// <param name="geometry">The list of points associated with the boundary geometry.</param>
/// <returns>True, if valid geometry was successfully returned, otherwise false.</returns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ public IMixedRealityBoundaryDataProvider BoundaryDataProvider
/// <inheritdoc />
public bool IsVisible
{
get => (BoundaryDataProvider != null && BoundaryDataProvider.IsPlatformBoundaryVisible) ||
get => (BoundaryDataProvider != null && BoundaryDataProvider.Visibility == BoundaryVisibility.Visible) ||
!BoundarySystemVisualizationRoot.IsNull() && BoundarySystemVisualizationRoot.activeInHierarchy &&
(ShowBoundary ||
ShowFloor ||
Expand Down
2 changes: 1 addition & 1 deletion XRTK-Core/Packages/com.xrtk.core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"Mixed Reality",
"DI"
],
"version": "0.2.11",
"version": "0.2.12",
StephenHodgson marked this conversation as resolved.
Show resolved Hide resolved
"unity": "2019.4",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion XRTK-Core/Packages/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"com.unity.2d.sprite": "1.0.0",
"com.unity.2d.tilemap": "1.0.0",
"com.unity.ide.rider": "1.1.4",
"com.unity.ide.rider": "1.2.1",
"com.unity.ide.vscode": "1.2.3",
"com.unity.mobile.android-logcat": "1.2.1",
"com.unity.test-framework": "1.1.24",
Expand Down
4 changes: 2 additions & 2 deletions XRTK-Core/Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"url": "https://packages.unity.com"
},
"com.unity.ide.rider": {
"version": "1.1.4",
"version": "1.2.1",
"depth": 0,
"source": "registry",
"dependencies": {
Expand Down Expand Up @@ -192,7 +192,7 @@
"depth": 0,
"source": "embedded",
"dependencies": {
"com.xrtk.core": "0.2.11",
"com.xrtk.core": "0.2.12",
"com.unity.xr.windowsmr.metro": "4.2.3"
}
},
Expand Down