Interface IMixedRealitySpatialAwarenessSystem
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.SpatialAwareness
Assembly: cs.temp.dll.dll
Syntax
public interface IMixedRealitySpatialAwarenessSystem : IMixedRealityEventSystem, IMixedRealityService, IDisposable
Properties
SpatialAwarenessObjectParent
Gets the parent object to which all spatial awareness GameObjects are to be parented.
Declaration
GameObject SpatialAwarenessObjectParent { get; }
Property Value
Type | Description |
---|---|
GameObject |
SpatialAwarenessSystemProfile
Typed representation of the ConfigurationProfile property.
Declaration
MixedRealitySpatialAwarenessSystemProfile SpatialAwarenessSystemProfile { get; }
Property Value
Type | Description |
---|---|
MixedRealitySpatialAwarenessSystemProfile |
Methods
ClearObservations()
Clears all registered observers' observations.
Declaration
void ClearObservations()
ClearObservations<T>(String)
Clears the observations of the specified observer.
Declaration
void ClearObservations<T>(string name = null)
where T : IMixedRealitySpatialAwarenessObserver
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the observer. |
Type Parameters
Name | Description |
---|---|
T | The observer type. |
CreateSpatialAwarenessObservationParent(String)
Creates the a parent, that is a child of the Spatial Awareness System parent so that the scene hierarchy does not get overly cluttered.
Declaration
GameObject CreateSpatialAwarenessObservationParent(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name |
Returns
Type | Description |
---|---|
GameObject | The GameObject to which spatial awareness objects will be parented. |
Remarks
This method is to be called by implementations of the IMixedRealitySpatialAwarenessObserver interface, not by application code. It is used to enable observations to be grouped by observer.
GenerateNewSourceId()
Generates a new source identifier for an IMixedRealitySpatialAwarenessObserver implementation.
Declaration
uint GenerateNewSourceId()
Returns
Type | Description |
---|---|
UInt32 | The source identifier to be used by the IMixedRealitySpatialAwarenessObserver implementation. |
Remarks
This method is to be called by implementations of the IMixedRealitySpatialAwarenessObserver interface, not by application code.
GetObserver(String)
Get the IMixedRealitySpatialAwarenessObserver that is registered under the specified name.
Declaration
[Obsolete("GetObserver will be removed in a future release. Cast to IMixedRealityDataProviderAccess and call GetDataProvider instead")]
IMixedRealitySpatialAwarenessObserver GetObserver(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name | The friendly name of the observer. |
Returns
Type | Description |
---|---|
IMixedRealitySpatialAwarenessObserver | The requested observer, or null if one cannot be found. |
Remarks
If more than one observer is registered under the specified name, the first will be returned.
GetObserver<T>(String)
Get the observer that is registered under the specified name matching the specified type.
Declaration
[Obsolete("GetObserver<T> will be removed in a future release. Cast to IMixedRealityDataProviderAccess and call GetDataProvider<T> instead")]
T GetObserver<T>(string name = null)
where T : IMixedRealitySpatialAwarenessObserver
Parameters
Type | Name | Description |
---|---|---|
String | name | The friendly name of the observer. |
Returns
Type | Description |
---|---|
T | The requested observer, or null if one cannot be found. |
Type Parameters
Name | Description |
---|---|
T | The desired spatial awareness observer type (ex: IMixedRealitySpatialAwarenessMeshObserver) |
Remarks
If more than one observer is registered under the specified name, the first will be returned.
GetObservers()
Gets the collection of registered IMixedRealitySpatialAwarenessObserver data providers.
Declaration
[Obsolete("GetObservers will be removed in a future release. Cast to IMixedRealityDataProviderAccess and call GetDataProviders instead")]
IReadOnlyList<IMixedRealitySpatialAwarenessObserver> GetObservers()
Returns
Type | Description |
---|---|
IReadOnlyList<IMixedRealitySpatialAwarenessObserver> | Read only copy of the list of registered observers. |
GetObservers<T>()
Get the collection of registered observers of the specified type.
Declaration
[Obsolete("GetObservers<T> will be removed in a future release. Cast to IMixedRealityDataProviderAccess and call GetDataProviders<T> instead")]
IReadOnlyList<T> GetObservers<T>()
where T : IMixedRealitySpatialAwarenessObserver
Returns
Type | Description |
---|---|
IReadOnlyList<T> | Readonly copy of the list of registered observers that implement the specified type. |
Type Parameters
Name | Description |
---|---|
T | The desired spatial awareness observer type (ex: IMixedRealitySpatialAwarenessMeshObserver) |
ResumeObserver<T>(String)
Starts / restarts the spatial observer registered under the specified name matching the specified type.
Declaration
void ResumeObserver<T>(string name)
where T : IMixedRealitySpatialAwarenessObserver
Parameters
Type | Name | Description |
---|---|---|
String | name | The friendly name of the observer. |
Type Parameters
Name | Description |
---|---|
T | The desired spatial awareness observer type (ex: IMixedRealitySpatialAwarenessMeshObserver) |
ResumeObservers()
Starts / restarts all spatial observers of the specified type.
Declaration
void ResumeObservers()
ResumeObservers<T>()
Starts / restarts all spatial observers of the specified type.
Declaration
void ResumeObservers<T>()
where T : IMixedRealitySpatialAwarenessObserver
Type Parameters
Name | Description |
---|---|
T | The desired spatial awareness observer type (ex: IMixedRealitySpatialAwarenessMeshObserver) |
SuspendObserver<T>(String)
Stops / pauses the spatial observer registered under the specified name matching the specified type.
Declaration
void SuspendObserver<T>(string name)
where T : IMixedRealitySpatialAwarenessObserver
Parameters
Type | Name | Description |
---|---|---|
String | name | The friendly name of the observer. |
Type Parameters
Name | Description |
---|---|
T | The desired spatial awareness observer type (ex: IMixedRealitySpatialAwarenessMeshObserver) |
SuspendObservers()
Stops / pauses all spatial observers.
Declaration
void SuspendObservers()
SuspendObservers<T>()
Stops / pauses all spatial observers of the specified type.
Declaration
void SuspendObservers<T>()
where T : IMixedRealitySpatialAwarenessObserver
Type Parameters
Name | Description |
---|---|
T |