|
| 1 | +# IMixedRealitySpatialAwarenessSystem Interface |
| 2 | + |
| 3 | +| Toolkit Layer | Namespace | |
| 4 | +| --- | --- | |
| 5 | +| Core | Microsoft.MixedReality.Toolkit.Core.Interfaces.SpatialAwarenessSystem | |
| 6 | + |
| 7 | +The IMixedRealitySpatialAwarenessSystem is the interface that defines the requirements of the spatial awareness system. The interface is divided, logically into multiple sections. As new functionality is added, the appropriate settings section is to be defined. |
| 8 | + |
| 9 | +<img src="Images/IMixedRealitySpatialAwarenessSystem.png"> |
| 10 | + |
| 11 | +## General System Controls |
| 12 | + |
| 13 | +The spatial awareness system contains data and methods that configure and control the overall spatial awareness system. |
| 14 | + |
| 15 | +### StartObserverSuspended |
| 16 | + |
| 17 | +Gets or sets a value that indicates that the developer intends for the spatial observer to not return data until explicitly resumed. This allows the application to decide precisely when it wishes to begin receiving spatial data notifications. |
| 18 | + |
| 19 | +### ObservationExtents |
| 20 | + |
| 21 | +Gets or sets the size of the volume from which individual observations will be made. This is not the total size of the observable space. |
| 22 | + |
| 23 | +### UpdateInterval |
| 24 | + |
| 25 | +Gets or sets the frequency, in seconds, at which the spatial observer updates. |
| 26 | + |
| 27 | +### IsObserverRunning |
| 28 | + |
| 29 | +Indicates the current running state of the spatial observer. |
| 30 | + |
| 31 | +*This is a read-only property, set by the spatial awareness system.* |
| 32 | + |
| 33 | +### void ResumeObserver() |
| 34 | + |
| 35 | +Starts / restarts the spatial observer. This will cause spatial observation events (ex: MeshAddedEvent) to resume being sent. |
| 36 | + |
| 37 | +### void SuspendObserver() |
| 38 | + |
| 39 | +Stops / pauses the spatial observer. This will cause spatial observation events to be suspended until ResumeObserver is called. |
| 40 | + |
| 41 | +## Mesh Handling Controls |
| 42 | + |
| 43 | +The mesh handling section contains the data and methods that configure and control the representation of data as a collection of meshes. |
| 44 | + |
| 45 | +For platforms that do not natively support returning observation data as a mesh, implementations can optionally process the native data before providing it to the caller. |
| 46 | + |
| 47 | +### Use Mesh System |
| 48 | + |
| 49 | +Gets or sets a value that indicates if the spatial mesh subsystem is in use by the application. Turning this off will suspend all mesh events and cause the subsystem to return an empty collection when the GetMeshes method is called. |
| 50 | + |
| 51 | +### MeshPhysicsLayer |
| 52 | + |
| 53 | +Get or sets the desired Unity Physics Layer on which to set the spatial mesh. |
| 54 | + |
| 55 | +### MeshPhysicsLayerMask |
| 56 | + |
| 57 | +Gets the bit mask that corresponds to the value specified in MeshPhysicsLayer. |
| 58 | + |
| 59 | +*This is a read-only property set by the spatial awareness system.* |
| 60 | + |
| 61 | +### MeshLevelOfDetail |
| 62 | + |
| 63 | +Gets or sets the level of detail, as a [MixedRealitySpatialAwarenessMeshLevelOfDetail](./MixedRealitySpatialAwarenessMeshLevelOfDetail.md) value, for the returned spatial mesh. Setting this value to Custom, implies that the developer is specifying a custom value for TrianglesPerCubicMeter. |
| 64 | + |
| 65 | +Specifying any other value will cause TrianglesPerCubicMeter to be overwritten. |
| 66 | + |
| 67 | +### TrianglesPerCubicMeter |
| 68 | + |
| 69 | +Gets or sets the level of detail, in triangles per cubic meter, for the returned spatial mesh. |
| 70 | + |
| 71 | +When specifying Coarse or Fine for the MeshLevelOfDetail, this value will be automatically overwritten. |
| 72 | + |
| 73 | +### RecalculateNormals |
| 74 | + |
| 75 | +Gets or sets the value indicating if the spatial awareness system to generate normal for the returned meshes as some platforms may not support returning normal along with the spatial mesh. |
| 76 | + |
| 77 | +### RenderMeshes |
| 78 | + |
| 79 | +Gets or sets a value indicating if the mesh subsystem is to automatically display surface meshes within the application. When enabled, the meshes will be added to the scene and rendered using the configured MeshMaterial. |
| 80 | + |
| 81 | +Applications that wish to process the Meshes should set this value to false. |
| 82 | + |
| 83 | +### MeshMaterial |
| 84 | + |
| 85 | +Gets or sets the material to be used when rendering spatial meshes. |
| 86 | + |
| 87 | +### [IMixedRealitySpatialAwarenessMeshDescription](./IMixedRealitySpatialAwarenessMeshDescription.md)[] GetMeshes() |
| 88 | + |
| 89 | +Returns the collection of Meshes being managed by the spatial awareness mesh subsystem. |
| 90 | + |
| 91 | +### GameObject[] GetMeshes() |
| 92 | + |
| 93 | +Returns the collection of GameObjects being managed by the spatial awareness mesh subsystem. |
| 94 | + |
| 95 | +## Surface Finding Controls |
| 96 | + |
| 97 | +The surface finding section contains the data and methods that configure and control the representation of data as a collection of planar surfaces. |
| 98 | + |
| 99 | +### UseSurfaceFindingSystem |
| 100 | + |
| 101 | +Indicates if the surface finding subsystem is in use by the application. Turning this off will suspend all surface events. |
| 102 | + |
| 103 | +### SurfacePhysicsLayer |
| 104 | + |
| 105 | +Get or sets the desired Unity Physics Layer on which to set spatial surfaces. |
| 106 | + |
| 107 | +### SurfacePhysicsLayerMask |
| 108 | + |
| 109 | +Gets the bit mask that corresponds to the value specified in SurfacePhysicsLayer. |
| 110 | + |
| 111 | +*This is a read-only property set by the spatial awareness system.* |
| 112 | + |
| 113 | +### SurfaceFindingMinimumArea |
| 114 | + |
| 115 | +Gets or sets the minimum surface area, in square meters, that must be satisfied before a surface is identified. |
| 116 | + |
| 117 | +### RenderFloorSurfaces |
| 118 | + |
| 119 | +Gets or sets a value indicating if the surface subsystem is to automatically display floor surfaces within the application. When enabled, the surfaces will be added to the scene and rendered using the configured FloorSurfaceMaterial. |
| 120 | + |
| 121 | +### FloorSurfaceMaterial |
| 122 | + |
| 123 | +Gets or sets the material to be used when rendering planar surface(s) identified as a floor. |
| 124 | + |
| 125 | +### RenderCeilingSurfaces |
| 126 | + |
| 127 | +Gets or sets a value indicating if the surface subsystem is to automatically display ceiling surfaces within the application. When enabled, the surfaces will be added to the scene and rendered using the configured CeilingSurfaceMaterial. |
| 128 | + |
| 129 | +### CeilingSurfaceMaterial |
| 130 | + |
| 131 | +Gets or sets the material to be used when rendering planar surface(s) identified as a ceiling. |
| 132 | + |
| 133 | +### RenderWallSurfaces |
| 134 | + |
| 135 | +Gets or sets a value indicating if the surface subsystem is to automatically display wall surfaces within the application. When enabled, the surfaces will be added to the scene and rendered using the configured WallSurfaceMaterial. |
| 136 | + |
| 137 | +### WallSurfaceMaterial |
| 138 | + |
| 139 | +Gets or sets the material to be used when rendering planar surface(s) identified as a wall. |
| 140 | + |
| 141 | +### RenderPlatformSurfaces |
| 142 | + |
| 143 | +Gets or sets a value indicating if the surface subsystem is to automatically display raised horizontal platform surfaces within the application. When enabled, the surfaces will be added to the scene and rendered using the configured PlatformSurfaceMaterial. |
| 144 | + |
| 145 | +### PlatformSurfaceMaterial |
| 146 | + |
| 147 | +Gets or sets the material to be used when rendering planar surface(s) identified as a raised horizontal platform. |
| 148 | + |
| 149 | +### [IMixedRealitySpatialAwarenessPlanarSurfaceDescription](./IMixedRealitySpatialAwarenessPlanarSurfaceDescription.md)[] GetSurfaces() |
| 150 | + |
| 151 | +Returns the collection of surface descriptions being tracked by the surface finding subsystem. |
| 152 | + |
| 153 | +### GameObject[] GetSurfaceObjects() |
| 154 | + |
| 155 | +Returns the collection of GameObjects managed by the surface finding subsystem. |
| 156 | + |
| 157 | +## See Also |
| 158 | + |
| 159 | +- [Mixed Reality Spatial Awareness System Architecture](./SpatialAwarenessSystemArchitecture.md) |
| 160 | +- [MixedRealitySpatialAwarenessSystem Class](./MixedRealitySpatialAwarenessSystem.md) |
| 161 | +- [IMixedRealitySpatialAwarenessMeshDescription Interface](./IMixedRealitySpatialAwarenessMeshDescription.md) |
| 162 | +- [IMixedRealitySpatialAwarenessPlanarSurfaceDescription Interface](./IMixedRealitySpatialAwarenessPlanarSurfaceDescription.md) |
| 163 | +- [MixedRealitySpatialAwarenessMeshLevelOfDetail Enumeration](./MixedRealitySpatialAwarenessMeshLevelOfDetail.md) |
0 commit comments