// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using Microsoft.MixedReality.Toolkit.Utilities; using UnityEngine; namespace Microsoft.MixedReality.Toolkit.Boundary { /// /// Manager interface for a Boundary system in the Mixed Reality Toolkit /// All replacement systems for providing Boundary functionality should derive from this interface /// public interface IMixedRealityBoundarySystem : IMixedRealityEventSystem, IMixedRealityEventSource { /// /// Typed representation of the ConfigurationProfile property. /// MixedRealityBoundaryVisualizationProfile BoundaryVisualizationProfile { get; } /// /// The scale (ex: World Scale) of the experience. /// ExperienceScale Scale { get; set; } /// /// The height of the play space, in meters. /// /// /// This is used to create a three dimensional boundary volume. /// float BoundaryHeight { get; set; } /// /// Enable / disable floor rendering. /// bool ShowFloor { get; set; } /// /// The physics layer that the generated floor is assigned to. /// int FloorPhysicsLayer { get; set; } /// /// Enable / disable play area rendering. /// bool ShowPlayArea { get; set; } /// /// The physics layer that the generated play area is assigned to. /// int PlayAreaPhysicsLayer { get; set; } /// /// Enable / disable tracked area rendering. /// bool ShowTrackedArea { get; set; } /// /// The physics layer that the generated tracked area is assigned to. /// int TrackedAreaPhysicsLayer { get; set; } /// /// Enable / disable boundary wall rendering. /// bool ShowBoundaryWalls { get; set; } /// /// The physics layer that the generated boundary walls are assigned to. /// int BoundaryWallsPhysicsLayer { get; set; } /// /// Enable / disable ceiling rendering. /// /// /// The ceiling is defined as a GameObject positioned above the floor. /// bool ShowBoundaryCeiling { get; set; } /// /// The physics layer that the generated boundary ceiling is assigned to. /// int CeilingPhysicsLayer { get; set; } /// /// Two dimensional representation of the geometry of the boundary, as provided /// by the platform. /// /// /// BoundaryGeometry should be treated as the outline of the player's space, placed /// on the floor. /// Edge[] Bounds { get; } /// /// Indicates the height of the floor, in relation to the coordinate system origin. /// /// /// If a floor has been located, FloorHeight.HasValue will be true, otherwise it will be false. /// float? FloorHeight { get; } /// /// Determines if a location is within the specified area of the boundary space. /// /// The location to be checked. /// The type of boundary space being checked. /// True if the location is within the specified area of the boundary space. /// /// Use BoundaryType.PlayArea for the inscribed volume /// and BoundaryType.TrackedArea for the area defined by the boundary edges. /// bool Contains(Vector3 location, BoundaryType boundaryType = BoundaryType.TrackedArea); /// /// Returns the description of the inscribed rectangular bounds. /// /// The center of the rectangle. /// The orientation of the rectangle. /// The width of the rectangle. /// The height of the rectangle. /// True if an inscribed rectangle was found in the boundary geometry, false otherwise. bool TryGetRectangularBoundsParams(out Vector2 center, out float angle, out float width, out float height); /// /// Gets the GameObject that represents the user's floor. /// /// The floor visualization object or null if one does not exist. GameObject GetFloorVisualization(); /// /// Gets the GameObject that represents the user's play area. /// /// The play area visualization object or null if one does not exist. GameObject GetPlayAreaVisualization(); /// /// Gets the GameObject that represents the user's tracked area. /// /// The tracked area visualization object or null if one does not exist. GameObject GetTrackedAreaVisualization(); /// /// Gets the GameObject that represents the user's boundary walls. /// /// The boundary wall visualization object or null if one does not exist. GameObject GetBoundaryWallVisualization(); /// /// Gets the GameObject that represents the upper surface of the user's boundary. /// /// The boundary ceiling visualization object or null if one does not exist. GameObject GetBoundaryCeilingVisualization(); } }