Class BaseSpatialObserver
Class providing a base implementation of the IMixedRealitySpatialAwarenessObserver interface.
Implements
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.SpatialAwareness
Assembly: cs.temp.dll.dll
Syntax
public abstract class BaseSpatialObserver : BaseDataProvider, IMixedRealitySpatialAwarenessObserver, IMixedRealityDataProvider, IMixedRealityService, IDisposable, IMixedRealityEventSource, IEqualityComparer
Constructors
BaseSpatialObserver(IMixedRealityServiceRegistrar, IMixedRealitySpatialAwarenessSystem, String, UInt32, BaseMixedRealityProfile)
Constructor.
Declaration
[Obsolete("This constructor is obsolete (registrar parameter is no longer required) and will be removed in a future version of the Microsoft Mixed Reality Toolkit.")]
protected BaseSpatialObserver(IMixedRealityServiceRegistrar registrar, IMixedRealitySpatialAwarenessSystem spatialAwarenessSystem, string name = null, uint priority = 10U, BaseMixedRealityProfile profile = null)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityServiceRegistrar | registrar | The IMixedRealityServiceRegistrar instance that loaded the observer. |
IMixedRealitySpatialAwarenessSystem | spatialAwarenessSystem | The IMixedRealitySpatialAwarenessSystem to which the observer is providing data. |
String | name | The friendly name of the data provider. |
UInt32 | priority | The registration priority of the data provider. |
BaseMixedRealityProfile | profile | The configuration profile for the data provider. |
BaseSpatialObserver(IMixedRealitySpatialAwarenessSystem, String, UInt32, BaseMixedRealityProfile)
Constructor.
Declaration
protected BaseSpatialObserver(IMixedRealitySpatialAwarenessSystem spatialAwarenessSystem, string name = null, uint priority = 10U, BaseMixedRealityProfile profile = null)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealitySpatialAwarenessSystem | spatialAwarenessSystem | The IMixedRealitySpatialAwarenessSystem to which the observer is providing data. |
String | name | The friendly name of the data provider. |
UInt32 | priority | The registration priority of the data provider. |
BaseMixedRealityProfile | profile | The configuration profile for the data provider. |
Properties
DefaultPhysicsLayer
Get or sets the default Unity Physics Layer on which to set the spatial object.
Declaration
public int DefaultPhysicsLayer { get; }
Property Value
Type | Description |
---|---|
Int32 |
IsRunning
Is the observer running (actively accumulating spatial data)?
Declaration
public bool IsRunning { get; protected set; }
Property Value
Type | Description |
---|---|
Boolean |
IsStationaryObserver
Should the observer remain stationary in the scene?
Declaration
public bool IsStationaryObserver { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Set IsStationaryObserver to false to move the volume with the user. If set to true, the origin will be 0,0,0 or the last known location.
ObservationExtents
Gets or sets the extents( 1/2 size) of the volume, in meters per axis, from which individual observations will be made.
Declaration
public Vector3 ObservationExtents { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
Remarks
When used when ObserverVolumeType is set to Sphere the X value of the extents will be used as the radius.
ObserverOrigin
Declaration
public Vector3 ObserverOrigin { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
ObserverRotation
Gets or sets the orientation of the volume in World Space.
Declaration
public Quaternion ObserverRotation { get; set; }
Property Value
Type | Description |
---|---|
Quaternion |
Remarks
This is only used when ObserverVolumeType is set to UserAlignedCube
ObserverVolumeType
Gets or sets the type of volume the observer should operate in.
Declaration
public VolumeType ObserverVolumeType { get; set; }
Property Value
Type | Description |
---|---|
VolumeType |
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 |
SpatialAwarenessSystem
The spatial awareness system that is associated with this observer.
Declaration
protected IMixedRealitySpatialAwarenessSystem SpatialAwarenessSystem { get; }
Property Value
Type | Description |
---|---|
IMixedRealitySpatialAwarenessSystem |
StartupBehavior
Indicates the developer's intended startup behavior.
Declaration
public AutoStartBehavior StartupBehavior { get; set; }
Property Value
Type | Description |
---|---|
AutoStartBehavior |
UpdateInterval
Gets or sets the frequency, in seconds, at which the spatial observer should update.
Declaration
public float UpdateInterval { get; set; }
Property Value
Type | Description |
---|---|
Single |
Methods
ClearObservations()
Clears the observer's collection of observations.
Declaration
public virtual void ClearObservations()
Remarks
If the observer is currently running, calling ClearObservations will suspend it.
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
GetHashCode(Object)
Declaration
public int GetHashCode(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Int32 |
Resume()
Start | resume the observer.
Declaration
public virtual void Resume()
Suspend()
Stop | pause the observer
Declaration
public virtual void Suspend()