Class BaseBoundarySystem
Inheritance
Implements
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Boundary
Assembly: cs.temp.dll.dll
Syntax
public abstract class BaseBoundarySystem : BaseCoreSystem, IMixedRealityBoundarySystem, IMixedRealityEventSystem, IMixedRealityService, IDisposable, IMixedRealityEventSource, IEqualityComparer
Constructors
BaseBoundarySystem(MixedRealityBoundaryVisualizationProfile, ExperienceScale)
Constructor.
Declaration
protected BaseBoundarySystem(MixedRealityBoundaryVisualizationProfile profile, ExperienceScale scale)
Parameters
| Type | Name | Description |
|---|---|---|
| MixedRealityBoundaryVisualizationProfile | profile | The configuration profile for the service. |
| ExperienceScale | scale | The application's configured ExperienceScale. |
Fields
RectangularBounds
The largest rectangle that is contained withing the play space geometry.
Declaration
protected InscribedRectangle RectangularBounds
Field Value
| Type | Description |
|---|---|
| InscribedRectangle |
Properties
BoundaryHeight
The height of the play space, in meters.
Declaration
public float BoundaryHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| Single |
Remarks
This is used to create a three dimensional boundary volume.
BoundaryVisualizationProfile
Typed representation of the ConfigurationProfile property.
Declaration
public MixedRealityBoundaryVisualizationProfile BoundaryVisualizationProfile { get; }
Property Value
| Type | Description |
|---|---|
| MixedRealityBoundaryVisualizationProfile |
BoundaryWallsPhysicsLayer
The physics layer that the generated boundary walls are assigned to.
Declaration
public int BoundaryWallsPhysicsLayer { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Bounds
Two dimensional representation of the geometry of the boundary, as provided by the platform.
Declaration
public Edge[] Bounds { get; protected set; }
Property Value
| Type | Description |
|---|---|
| Edge[] |
Remarks
BoundaryGeometry should be treated as the outline of the player's space, placed on the floor.
CeilingPhysicsLayer
The physics layer that the generated boundary ceiling is assigned to.
Declaration
public int CeilingPhysicsLayer { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
FloorHeight
Indicates the height of the floor, in relation to the coordinate system origin.
Declaration
public float? FloorHeight { get; protected set; }
Property Value
| Type | Description |
|---|---|
| Nullable<Single> |
Remarks
If a floor has been located, FloorHeight.HasValue will be true, otherwise it will be false.
FloorPhysicsLayer
The physics layer that the generated floor is assigned to.
Declaration
public int FloorPhysicsLayer { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Name
Optional Priority attribute if multiple services of the same type are required, enables targeting a service for action.
Declaration
public override string Name { get; protected set; }
Property Value
| Type | Description |
|---|---|
| String |
Overrides
PlayAreaPhysicsLayer
The physics layer that the generated play area is assigned to.
Declaration
public int PlayAreaPhysicsLayer { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Scale
The scale (ex: World Scale) of the experience.
Declaration
public ExperienceScale Scale { get; set; }
Property Value
| Type | Description |
|---|---|
| ExperienceScale |
ShowBoundaryCeiling
Enable / disable ceiling rendering.
Declaration
public bool ShowBoundaryCeiling { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
Remarks
The ceiling is defined as a GameObject positioned BoundaryHeight above the floor.
ShowBoundaryWalls
Enable / disable boundary wall rendering.
Declaration
public bool ShowBoundaryWalls { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
ShowFloor
Enable / disable floor rendering.
Declaration
public bool ShowFloor { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
ShowPlayArea
Enable / disable play area rendering.
Declaration
public bool ShowPlayArea { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
ShowTrackedArea
Enable / disable tracked area rendering.
Declaration
public bool ShowTrackedArea { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
SourceId
The Unique Source Id of this Event Source.
Declaration
public uint SourceId { get; }
Property Value
| Type | Description |
|---|---|
| UInt32 |
SourceName
The Name of this Event Source.
Declaration
public string SourceName { get; }
Property Value
| Type | Description |
|---|---|
| String |
TrackedAreaPhysicsLayer
The physics layer that the generated tracked area is assigned to.
Declaration
public int TrackedAreaPhysicsLayer { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Methods
Contains(Vector3, BoundaryType)
Determines if a location is within the specified area of the boundary space.
Declaration
public bool Contains(Vector3 location, BoundaryType boundaryType = BoundaryType.TrackedArea)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | location | The location to be checked. |
| BoundaryType | boundaryType | The type of boundary space being checked. |
Returns
| Type | Description |
|---|---|
| Boolean | True if the location is within the specified area of the boundary space. |
Remarks
Use: BoundaryType.PlayArea for the inscribed volume BoundaryType.TrackedArea for the area defined by the boundary edges.
Destroy()
Optional Destroy function to perform cleanup of the service before the Mixed Reality Toolkit is destroyed.
Declaration
public override void Destroy()
Overrides
GetBoundaryCeilingVisualization()
Gets the GameObject that represents the upper surface of the user's boundary.
Declaration
public GameObject GetBoundaryCeilingVisualization()
Returns
| Type | Description |
|---|---|
| GameObject | The boundary ceiling visualization object or null if one does not exist. |
GetBoundaryGeometry()
Retrieves the boundary geometry.
Declaration
protected abstract List<Vector3> GetBoundaryGeometry()
Returns
| Type | Description |
|---|---|
| List<Vector3> | A list of geometry points, or null if geometry was unavailable. |
GetBoundaryWallVisualization()
Gets the GameObject that represents the user's boundary walls.
Declaration
public GameObject GetBoundaryWallVisualization()
Returns
| Type | Description |
|---|---|
| GameObject | The boundary wall visualization object or null if one does not exist. |
GetFloorVisualization()
Gets the GameObject that represents the user's floor.
Declaration
public GameObject GetFloorVisualization()
Returns
| Type | Description |
|---|---|
| GameObject | The floor visualization object or null if one does not exist. |
GetHashCode(Object)
Declaration
public int GetHashCode(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | obj |
Returns
| Type | Description |
|---|---|
| Int32 |
GetPlayAreaVisualization()
Gets the GameObject that represents the user's play area.
Declaration
public GameObject GetPlayAreaVisualization()
Returns
| Type | Description |
|---|---|
| GameObject | The play area visualization object or null if one does not exist. |
GetTrackedAreaVisualization()
Gets the GameObject that represents the user's tracked area.
Declaration
public GameObject GetTrackedAreaVisualization()
Returns
| Type | Description |
|---|---|
| GameObject | The tracked area visualization object or null if one does not exist. |
HandleEvent<T>(BaseEventData, ExecuteEvents.EventFunction<T>)
Declaration
public override void HandleEvent<T>(BaseEventData eventData, ExecuteEvents.EventFunction<T> eventHandler)
where T : IEventSystemHandler
Parameters
| Type | Name | Description |
|---|---|---|
| BaseEventData | eventData | |
| ExecuteEvents.EventFunction<T> | eventHandler |
Type Parameters
| Name | Description |
|---|---|
| T |
Overrides
Initialize()
The initialize function is used to setup the service once created. This method is called once all services have been registered in the Mixed Reality Toolkit.
Declaration
public override void Initialize()
Overrides
Register(GameObject)
Registers the GameObject to listen for boundary events.
Declaration
public override void Register(GameObject listener)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | listener |
Overrides
SetTrackingSpace()
Updates the tracking space on the XR device.
Declaration
protected abstract void SetTrackingSpace()
TryGetRectangularBoundsParams(out Vector2, out Single, out Single, out Single)
Returns the description of the inscribed rectangular bounds.
Declaration
public bool TryGetRectangularBoundsParams(out Vector2 center, out float angle, out float width, out float height)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | center | The center of the rectangle. |
| Single | angle | The orientation of the rectangle. |
| Single | width | The width of the rectangle. |
| Single | height | The height of the rectangle. |
Returns
| Type | Description |
|---|---|
| Boolean | True if an inscribed rectangle was found in the boundary geometry, false otherwise. |
Unregister(GameObject)
UnRegisters the GameObject to listen for boundary events. ///
Declaration
public override void Unregister(GameObject listener)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | listener |