Class GenericXRSDKSpatialMeshObserver
Implements
Namespace: Microsoft.MixedReality.Toolkit.XRSDK
Assembly: cs.temp.dll.dll
Syntax
public class GenericXRSDKSpatialMeshObserver : BaseSpatialMeshObserver, IMixedRealityCapabilityCheck
Constructors
GenericXRSDKSpatialMeshObserver(IMixedRealitySpatialAwarenessSystem, String, UInt32, BaseMixedRealityProfile)
Constructor.
Declaration
public GenericXRSDKSpatialMeshObserver(IMixedRealitySpatialAwarenessSystem spatialAwarenessSystem, string name = null, uint priority = default(uint), BaseMixedRealityProfile profile = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IMixedRealitySpatialAwarenessSystem | spatialAwarenessSystem | |
| String | name | Friendly name of the service. |
| UInt32 | priority | Service priority. Used to determine order of instantiation. |
| BaseMixedRealityProfile | profile | The service's configuration profile. |
Fields
spareMeshObject
When surfaces are replaced or removed, rather than destroying them, we'll keep one as a spare for use in outstanding mesh requests. That way, we'll have fewer game object create/destroy cycles, which should help performance.
Declaration
protected SpatialAwarenessMeshObject spareMeshObject
Field Value
| Type | Description |
|---|---|
| SpatialAwarenessMeshObject |
Methods
CheckCapability(MixedRealityCapability)
Checks to see if one or more registered data providers supports the requested capability on the current platform.
Declaration
public bool CheckCapability(MixedRealityCapability capability)
Parameters
| Type | Name | Description |
|---|---|---|
| MixedRealityCapability | capability | The capability to check. |
Returns
| Type | Description |
|---|---|
| Boolean | True if the capability is supported, false otherwise. |
CleanupObserver()
Implements proper cleanup of the SurfaceObserver.
Declaration
protected override void CleanupObserver()
ClearObservations()
Declaration
public override void ClearObservations()
ConfigureObserverVolume()
Applies the configured observation extents.
Declaration
protected virtual void ConfigureObserverVolume()
CreateObserver()
Creates the XRMeshSubsystem and handles the desired startup behavior.
Declaration
protected override void CreateObserver()
Initialize()
Declaration
public override void Initialize()
LookupTriangleDensity(SpatialAwarenessMeshLevelOfDetail)
Declaration
protected override int LookupTriangleDensity(SpatialAwarenessMeshLevelOfDetail levelOfDetail)
Parameters
| Type | Name | Description |
|---|---|---|
| SpatialAwarenessMeshLevelOfDetail | levelOfDetail |
Returns
| Type | Description |
|---|---|
| Int32 |
ReclaimMeshObject(SpatialAwarenessMeshObject)
Reclaims the SpatialAwarenessMeshObject to allow for later reuse.
Declaration
protected void ReclaimMeshObject(SpatialAwarenessMeshObject availableMeshObject)
Parameters
| Type | Name | Description |
|---|---|---|
| SpatialAwarenessMeshObject | availableMeshObject |
RemoveMeshObject(Int32)
Removes the SpatialAwarenessMeshObject associated with the specified id.
Declaration
protected void RemoveMeshObject(int id)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | id | The id of the mesh to be removed. |
Resume()
Declaration
public override void Resume()
Suspend()
Declaration
public override void Suspend()
Update()
Declaration
public override void Update()