mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0

    Show / Hide Table of Contents

    Class BaseSpatialMeshObserver

    Class providing a base implementation of the IMixedRealitySpatialAwarenessMeshObserver interface.

    Inheritance
    Object
    BaseService
    BaseDataProvider<IMixedRealitySpatialAwarenessSystem>
    BaseSpatialObserver
    BaseSpatialMeshObserver
    Implements
    IMixedRealitySpatialAwarenessMeshObserver
    IMixedRealitySpatialAwarenessObserver
    IMixedRealityDataProvider
    IMixedRealityService
    IDisposable
    IMixedRealityEventSource
    IEqualityComparer
    Inherited Members
    BaseSpatialObserver.SpatialAwarenessSystem
    BaseSpatialObserver.Equals(Object)
    BaseSpatialObserver.GetHashCode(Object)
    BaseSpatialObserver.GetHashCode()
    BaseSpatialObserver.SourceId
    BaseSpatialObserver.SourceName
    BaseSpatialObserver.StartupBehavior
    BaseSpatialObserver.DefaultPhysicsLayer
    BaseSpatialObserver.IsRunning
    BaseSpatialObserver.IsStationaryObserver
    BaseSpatialObserver.ObserverRotation
    BaseSpatialObserver.ObserverOrigin
    BaseSpatialObserver.ObserverVolumeType
    BaseSpatialObserver.ObservationExtents
    BaseSpatialObserver.UpdateInterval
    BaseSpatialObserver.Resume()
    BaseSpatialObserver.Suspend()
    BaseSpatialObserver.ClearObservations()
    BaseSpatialObserver.DefaultSpatialAwarenessLayer
    BaseSpatialObserver.CreateObserver()
    BaseSpatialObserver.CleanupObserver()
    BaseSpatialObserver.Dispose(Boolean)
    BaseSpatialObserver.Reset()
    BaseSpatialObserver.Enable()
    BaseSpatialObserver.Disable()
    BaseSpatialObserver.Destroy()
    BaseDataProvider<IMixedRealitySpatialAwarenessSystem>.Registrar
    BaseDataProvider<IMixedRealitySpatialAwarenessSystem>.Service
    BaseService.DefaultPriority
    BaseService.Name
    BaseService.Priority
    BaseService.ConfigurationProfile
    BaseService.Update()
    BaseService.LateUpdate()
    BaseService.disposed
    BaseService.Dispose()
    Object.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.MixedReality.Toolkit.SpatialAwareness
    Assembly: cs.temp.dll.dll
    Syntax
    public abstract class BaseSpatialMeshObserver : BaseSpatialObserver, IMixedRealitySpatialAwarenessMeshObserver, IMixedRealitySpatialAwarenessObserver, IMixedRealityDataProvider, IMixedRealityService, IDisposable, IMixedRealityEventSource, IEqualityComparer

    Constructors

    BaseSpatialMeshObserver(IMixedRealitySpatialAwarenessSystem, String, UInt32, BaseMixedRealityProfile)

    Constructor.

    Declaration
    protected BaseSpatialMeshObserver(IMixedRealitySpatialAwarenessSystem spatialAwarenessSystem, string name = null, uint priority = default(uint), 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.

    Fields

    meshes

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

    Declaration
    protected readonly Dictionary<int, SpatialAwarenessMeshObject> meshes
    Field Value
    Type Description
    Dictionary<Int32, SpatialAwarenessMeshObject>

    meshEventData

    Declaration
    protected MixedRealitySpatialAwarenessEventData<SpatialAwarenessMeshObject> meshEventData
    Field Value
    Type Description
    MixedRealitySpatialAwarenessEventData<SpatialAwarenessMeshObject>

    OnMeshAdded

    Event sent whenever a mesh is added.

    Declaration
    protected static readonly ExecuteEvents.EventFunction<IMixedRealitySpatialAwarenessObservationHandler<SpatialAwarenessMeshObject>> OnMeshAdded
    Field Value
    Type Description
    ExecuteEvents.EventFunction<IMixedRealitySpatialAwarenessObservationHandler<SpatialAwarenessMeshObject>>

    OnMeshRemoved

    Event sent whenever a mesh is discarded.

    Declaration
    protected static readonly ExecuteEvents.EventFunction<IMixedRealitySpatialAwarenessObservationHandler<SpatialAwarenessMeshObject>> OnMeshRemoved
    Field Value
    Type Description
    ExecuteEvents.EventFunction<IMixedRealitySpatialAwarenessObservationHandler<SpatialAwarenessMeshObject>>

    OnMeshUpdated

    Event sent whenever a mesh is updated.

    Declaration
    protected static readonly ExecuteEvents.EventFunction<IMixedRealitySpatialAwarenessObservationHandler<SpatialAwarenessMeshObject>> OnMeshUpdated
    Field Value
    Type Description
    ExecuteEvents.EventFunction<IMixedRealitySpatialAwarenessObservationHandler<SpatialAwarenessMeshObject>>

    Properties

    DisplayOption

    Declaration
    public SpatialAwarenessMeshDisplayOptions DisplayOption { get; set; }
    Property Value
    Type Description
    SpatialAwarenessMeshDisplayOptions

    LevelOfDetail

    Declaration
    public SpatialAwarenessMeshLevelOfDetail LevelOfDetail { get; set; }
    Property Value
    Type Description
    SpatialAwarenessMeshLevelOfDetail

    Meshes

    Declaration
    public IReadOnlyDictionary<int, SpatialAwarenessMeshObject> Meshes { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<Int32, SpatialAwarenessMeshObject>

    MeshPhysicsLayer

    Declaration
    public int MeshPhysicsLayer { get; set; }
    Property Value
    Type Description
    Int32

    MeshPhysicsLayerMask

    Declaration
    public int MeshPhysicsLayerMask { get; }
    Property Value
    Type Description
    Int32

    ObservedObjectParent

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

    Declaration
    protected virtual GameObject ObservedObjectParent { get; }
    Property Value
    Type Description
    GameObject

    OcclusionMaterial

    Declaration
    public Material OcclusionMaterial { get; set; }
    Property Value
    Type Description
    Material

    RecalculateNormals

    Declaration
    public bool RecalculateNormals { get; set; }
    Property Value
    Type Description
    Boolean

    TrianglesPerCubicMeter

    Declaration
    public int TrianglesPerCubicMeter { get; set; }
    Property Value
    Type Description
    Int32

    VisibleMaterial

    Declaration
    public Material VisibleMaterial { get; set; }
    Property Value
    Type Description
    Material

    Methods

    ApplyUpdatedMeshDisplayOption(SpatialAwarenessMeshDisplayOptions)

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

    Declaration
    protected virtual void ApplyUpdatedMeshDisplayOption(SpatialAwarenessMeshDisplayOptions option)
    Parameters
    Type Name Description
    SpatialAwarenessMeshDisplayOptions option

    The SpatialAwarenessMeshDisplayOptions value to be used to determine the appropriate material.

    ApplyUpdatedPhysicsLayer()

    Updates the mesh physics layer for current mesh observations.

    Declaration
    protected virtual void ApplyUpdatedPhysicsLayer()

    Initialize()

    Initializes event data and creates the observer.

    Declaration
    public override void Initialize()
    Overrides
    BaseSpatialObserver.Initialize()

    LookupTriangleDensity(SpatialAwarenessMeshLevelOfDetail)

    Maps SpatialAwarenessMeshLevelOfDetail to TrianglesPerCubicMeter.

    Declaration
    protected virtual int LookupTriangleDensity(SpatialAwarenessMeshLevelOfDetail levelOfDetail)
    Parameters
    Type Name Description
    SpatialAwarenessMeshLevelOfDetail levelOfDetail

    The desired level of density for the spatial mesh.

    Returns
    Type Description
    Int32

    The number of triangles per cubic meter that will result in the desired level of density.

    ReadProfile()

    Declaration
    protected virtual void ReadProfile()

    Implements

    IMixedRealitySpatialAwarenessMeshObserver
    IMixedRealitySpatialAwarenessObserver
    IMixedRealityDataProvider
    IMixedRealityService
    IDisposable
    IMixedRealityEventSource
    IEqualityComparer
    In This Article
    • Constructors
      • BaseSpatialMeshObserver(IMixedRealitySpatialAwarenessSystem, String, UInt32, BaseMixedRealityProfile)
    • Fields
      • meshes
      • meshEventData
      • OnMeshAdded
      • OnMeshRemoved
      • OnMeshUpdated
    • Properties
      • DisplayOption
      • LevelOfDetail
      • Meshes
      • MeshPhysicsLayer
      • MeshPhysicsLayerMask
      • ObservedObjectParent
      • OcclusionMaterial
      • RecalculateNormals
      • TrianglesPerCubicMeter
      • VisibleMaterial
    • Methods
      • ApplyUpdatedMeshDisplayOption(SpatialAwarenessMeshDisplayOptions)
      • ApplyUpdatedPhysicsLayer()
      • Initialize()
      • LookupTriangleDensity(SpatialAwarenessMeshLevelOfDetail)
      • ReadProfile()
    • Implements
    Back to top Generated by DocFX