Edit

Bagikan melalui


GenericXRSDKSpatialMeshObserver Class

Definition

public ref class GenericXRSDKSpatialMeshObserver : Microsoft::MixedReality::Toolkit::SpatialAwareness::BaseSpatialMeshObserver, Microsoft::MixedReality::Toolkit::IMixedRealityCapabilityCheck
[Microsoft.MixedReality.Toolkit.MixedRealityDataProvider(typeof(Microsoft.MixedReality.Toolkit.SpatialAwareness.IMixedRealitySpatialAwarenessSystem), (Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms) 0, "XR SDK Spatial Mesh Observer", "Profiles/DefaultMixedRealitySpatialAwarenessMeshObserverProfile.asset", "MixedRealityToolkit.SDK", false)]
[UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/spatial-awareness/spatial-awareness-getting-started")]
public class GenericXRSDKSpatialMeshObserver : Microsoft.MixedReality.Toolkit.SpatialAwareness.BaseSpatialMeshObserver, Microsoft.MixedReality.Toolkit.IMixedRealityCapabilityCheck
[UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/spatial-awareness/spatial-awareness-getting-started")]
[Microsoft.MixedReality.Toolkit.MixedRealityDataProvider(typeof(Microsoft.MixedReality.Toolkit.SpatialAwareness.IMixedRealitySpatialAwarenessSystem), Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.Android | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.IOS | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.LinuxEditor | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.LinuxStandalone | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.Lumin | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.MacEditor | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.MacStandalone | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.Web | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.WindowsEditor | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.WindowsStandalone, "XR SDK Spatial Mesh Observer", "Profiles/DefaultMixedRealitySpatialAwarenessMeshObserverProfile.asset", "MixedRealityToolkit.SDK", true, Microsoft.MixedReality.Toolkit.Utilities.SupportedUnityXRPipelines.XRSDK)]
public class GenericXRSDKSpatialMeshObserver : Microsoft.MixedReality.Toolkit.SpatialAwareness.BaseSpatialMeshObserver, Microsoft.MixedReality.Toolkit.IMixedRealityCapabilityCheck
[<Microsoft.MixedReality.Toolkit.MixedRealityDataProvider(typeof(Microsoft.MixedReality.Toolkit.SpatialAwareness.IMixedRealitySpatialAwarenessSystem), (Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms) 0, "XR SDK Spatial Mesh Observer", "Profiles/DefaultMixedRealitySpatialAwarenessMeshObserverProfile.asset", "MixedRealityToolkit.SDK", false)>]
[<UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/spatial-awareness/spatial-awareness-getting-started")>]
type GenericXRSDKSpatialMeshObserver = class
    inherit BaseSpatialMeshObserver
    interface IMixedRealityCapabilityCheck
[<UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/spatial-awareness/spatial-awareness-getting-started")>]
[<Microsoft.MixedReality.Toolkit.MixedRealityDataProvider(typeof(Microsoft.MixedReality.Toolkit.SpatialAwareness.IMixedRealitySpatialAwarenessSystem), Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.Android | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.IOS | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.LinuxEditor | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.LinuxStandalone | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.Lumin | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.MacEditor | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.MacStandalone | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.Web | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.WindowsEditor | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.WindowsStandalone, "XR SDK Spatial Mesh Observer", "Profiles/DefaultMixedRealitySpatialAwarenessMeshObserverProfile.asset", "MixedRealityToolkit.SDK", true, Microsoft.MixedReality.Toolkit.Utilities.SupportedUnityXRPipelines.XRSDK)>]
type GenericXRSDKSpatialMeshObserver = class
    inherit BaseSpatialMeshObserver
    interface IMixedRealityCapabilityCheck
Public Class GenericXRSDKSpatialMeshObserver
Inherits BaseSpatialMeshObserver
Implements IMixedRealityCapabilityCheck
Inheritance
Derived
Attributes
MixedRealityDataProviderAttribute UnityEngine.HelpURLAttribute
Implements

Constructors

GenericXRSDKSpatialMeshObserver(IMixedRealitySpatialAwarenessSystem, String, UInt32, BaseMixedRealityProfile)

Constructor.

Fields

DefaultPriority (Inherited from BaseService)
DefaultSpatialAwarenessLayer

Default dedicated layer for spatial awareness layer used by most components in MRTK

(Inherited from BaseSpatialObserver)
disposed

Value indicating if the object has completed disposal.

(Inherited from BaseService)
meshes

The backing field for Meshes, to allow the mesh observer implementation to track its meshes.

(Inherited from BaseSpatialMeshObserver)
meshEventData (Inherited from BaseSpatialMeshObserver)
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.

Properties

ConfigurationProfile

The configuration profile for the service.

(Inherited from BaseService)
DefaultPhysicsLayer

Get or sets the default Unity Physics Layer on which to set the spatial object.

(Inherited from BaseSpatialObserver)
DisplayOption

Gets or sets a value indicating how the mesh subsystem is to display surface meshes within the application.

(Inherited from BaseSpatialMeshObserver)
IsActiveLoader
IsEnabled

Indicates whether or not the service is currently enabled.

(Inherited from BaseService)
IsInitialized

Indicates whether or not the service has been initialized.

(Inherited from BaseService)
IsMarkedDestroyed

Indicates whether or not the Destroy method been called on this service.

(Inherited from BaseService)
IsRunning

Is the observer running (actively accumulating spatial data)?

(Inherited from BaseSpatialObserver)
IsStationaryObserver

Should the observer remain stationary in the scene?

(Inherited from BaseSpatialObserver)
LevelOfDetail

Gets or sets the level of detail, as a MixedRealitySpatialAwarenessMeshLevelOfDetail value, for the returned spatial mesh. Setting this value to Custom, implies that the developer is specifying a custom value for MeshTrianglesPerCubicMeter.

(Inherited from BaseSpatialMeshObserver)
Meshes

Gets the collection of SpatialAwarenessMeshObjects being managed by the observer.

(Inherited from BaseSpatialMeshObserver)
MeshPhysicsLayer

Get or sets the desired Unity Physics Layer on which to set the spatial mesh.

(Inherited from BaseSpatialMeshObserver)
MeshPhysicsLayerMask

Gets the bit mask that corresponds to the value specified in MeshPhysicsLayer.

(Inherited from BaseSpatialMeshObserver)
Name

Optional Priority attribute if multiple services of the same type are required, enables targeting a service for action.

(Inherited from BaseService)
ObservationExtents

Gets or sets the extents (1/2 size) of the volume, in meters per axis, from which individual observations will be made.

(Inherited from BaseSpatialObserver)
ObservationParent

The parent GameObject for all observed meshes to be placed under.

(Inherited from BaseSpatialObserver)
ObservedObjectParent

The parent GameObject for all observed meshes to be placed under.

(Inherited from BaseSpatialMeshObserver)
ObserverOrigin

Gets or sets the origin, in world space, of the observer.

(Inherited from BaseSpatialObserver)
ObserverRotation

Gets or sets the orientation of the volume in world space.

(Inherited from BaseSpatialObserver)
ObserverVolumeType

Gets or sets the type of volume the observer should operate in.

(Inherited from BaseSpatialObserver)
OcclusionMaterial

Gets or sets the Material to be used when spatial Meshes should occlude other objects.

(Inherited from BaseSpatialMeshObserver)
PhysicsMaterial (Inherited from BaseSpatialMeshObserver)
Priority

Optional Priority to reorder registered managers based on their respective priority, reduces the risk of race conditions by prioritizing the order in which managers are evaluated.

(Inherited from BaseService)
RecalculateNormals

Indicates whether or not mesh normals should be recalculated by the observer.

(Inherited from BaseSpatialMeshObserver)
Registrar
Obsolete.

The service registrar instance that registered this service.

(Inherited from BaseDataProvider<T>)
RuntimeSpatialMeshPrefab (Inherited from BaseSpatialMeshObserver)
Service

The service instance to which this provider is providing data.

(Inherited from BaseDataProvider<T>)
SourceId

The unique source id of this event source.

(Inherited from BaseSpatialObserver)
SourceName

The name of this event source.

(Inherited from BaseSpatialObserver)
SpatialAwarenessSystem
Obsolete.

The spatial awareness system that is associated with this observer.

(Inherited from BaseSpatialObserver)
StartupBehavior

Indicates the developer's intended startup behavior.

(Inherited from BaseSpatialObserver)
TrianglesPerCubicMeter

Gets or sets the level of detail, in triangles per cubic meter, for the returned spatial mesh.

(Inherited from BaseSpatialMeshObserver)
UpdateInterval

Gets or sets the frequency, in seconds, at which the spatial observer should update.

(Inherited from BaseSpatialObserver)
VisibleMaterial

Gets or sets the Material to be used when displaying Meshes.

(Inherited from BaseSpatialMeshObserver)

Methods

AddRuntimeSpatialMeshPrefabToHierarchy()

Instantiates and appends a prefab to the Runtime (on device and not in editor) Spatial Awareness hierarchy.

The default structure of the Spatial Awareness System:

Spatial Awareness System Windows Mixed Reality Spatial Mesh Observer Spatial Mesh - ID Spatial Mesh - ID ...

If the Runtime Spatial Mesh Prefab field is not null, this method adds the prefab between the Spatial Awareness System and the Windows Mixed Reality Spatial Mesh Observer which results in this structure:

Spatial Awareness System Runtime Spatial Mesh Prefab Windows Mixed Reality Spatial Mesh Observer Spatial Mesh - ID Spatial Mesh - ID ...

(Inherited from BaseSpatialMeshObserver)
ApplyUpdatedMeshDisplayOption(SpatialAwarenessMeshDisplayOptions)

Applies the mesh display option to existing meshes when modified at runtime.

(Inherited from BaseSpatialMeshObserver)
ApplyUpdatedMeshPhysics()

Applies the physical material to existing meshes when modified at runtime.

(Inherited from BaseSpatialMeshObserver)
ApplyUpdatedPhysicsLayer()

Updates the mesh physics layer for current mesh observations.

(Inherited from BaseSpatialMeshObserver)
CheckCapability(MixedRealityCapability)

Checks to see if one or more registered data providers supports the requested capability on the current platform.

CleanupObserver()

Implements proper cleanup of the SurfaceObserver.

ClearObservations()

Clears the observer's collection of observations.

ConfigureObserverVolume()

Applies the configured observation extents.

CreateObserver()

Creates the XRMeshSubsystem and handles the desired startup behavior.

CreateObserver()

Creates the spatial observer and handles the desired startup behavior.

(Inherited from BaseSpatialObserver)
Destroy()

Optional Destroy function to perform cleanup of the service before the Mixed Reality Toolkit is destroyed.

(Inherited from BaseSpatialObserver)
Disable()

Optional Disable function to pause the service.

(Inherited from BaseSpatialObserver)
Dispose()

Cleanup resources used by this object.

(Inherited from BaseService)
Dispose(Boolean)

Cleanup resources used by the object

(Inherited from BaseSpatialObserver)
Enable()

Optional Enable function to enable / re-enable the service.

Enable()

Optional Enable function to enable / re-enable the service.

(Inherited from BaseSpatialObserver)
Equals(Object) (Inherited from BaseSpatialObserver)
GetHashCode() (Inherited from BaseSpatialObserver)
GetHashCode(Object) (Inherited from BaseSpatialObserver)
Initialize()
Initialize()

Initializes event data and creates the observer.

(Inherited from BaseSpatialMeshObserver)
LateUpdate()

Optional LateUpdate function to that is called after Update has been called on all services.

(Inherited from BaseService)
LookupTriangleDensity(SpatialAwarenessMeshLevelOfDetail)

Maps SpatialAwarenessMeshLevelOfDetail to TrianglesPerCubicMeter.

ReadProfile() (Inherited from BaseSpatialMeshObserver)
ReclaimMeshObject(SpatialAwarenessMeshObject)

Reclaims the SpatialAwarenessMeshObject to allow for later reuse.

RemoveMeshObject(Int32)

Removes the SpatialAwarenessMeshObject associated with the specified id.

Reset()

Suspends the observer, clears observations, cleans up the observer, then re-initializes.

(Inherited from BaseSpatialObserver)
Resume()

Start | resume the observer.

Suspend()

Stop | pause the observer

Update()

Optional Update function to perform per-frame updates of the service.

Explicit Interface Implementations

IEqualityComparer.Equals(Object, Object) (Inherited from BaseSpatialObserver)

Applies to