We've moved!

Starting from MRTK 2.6, we are publishing both conceptual docs and API references on docs.microsoft.com. For conceptual docs, please visit our new landing page. For API references, please visit the MRTK-Unity section of the dot net API explorer. Existing content will remain here but will not be updated further.

Search Results for

    Show / Hide Table of Contents

    Class WindowsSceneUnderstandingObserver

    A Spatial Awareness observer with Scene Understanding capabilities.

    Inheritance
    Object
    WindowsSceneUnderstandingObserver
    Implements
    IMixedRealitySceneUnderstandingObserver
    Namespace: Microsoft.MixedReality.Toolkit.WindowsSceneUnderstanding.Experimental
    Assembly: cs.temp.dll.dll
    Syntax
    public class WindowsSceneUnderstandingObserver : BaseSpatialObserver, IMixedRealitySceneUnderstandingObserver
    Remarks

    Only works with HoloLens 2 and Unity 2019.4+

    Constructors

    WindowsSceneUnderstandingObserver(IMixedRealitySpatialAwarenessSystem, String, UInt32, BaseMixedRealityProfile)

    Constructor.

    Declaration
    public WindowsSceneUnderstandingObserver(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.

    Properties

    AutoUpdate

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

    CreateGameObjects

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

    DefaultMaterial

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

    DefaultWorldMeshMaterial

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

    FirstAutoUpdateDelay

    Declaration
    public float FirstAutoUpdateDelay { get; set; }
    Property Value
    Type Description
    Single

    InferRegions

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

    InstantiationBatchRate

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

    OcclusionMaskResolution

    Declaration
    public Vector2Int OcclusionMaskResolution { get; set; }
    Property Value
    Type Description
    Vector2Int

    OrientScene

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

    QueryRadius

    Declaration
    public float QueryRadius { get; set; }
    Property Value
    Type Description
    Single

    RequestMeshData

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

    RequestOcclusionMask

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

    RequestPlaneData

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

    SceneObjects

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

    SerializedScene

    The saved scene understanding file

    Declaration
    public TextAsset SerializedScene { get; set; }
    Property Value
    Type Description
    TextAsset

    ShouldLoadFromFile

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

    SurfaceTypes

    Declaration
    public SpatialAwarenessSurfaceTypes SurfaceTypes { get; set; }
    Property Value
    Type Description
    SpatialAwarenessSurfaceTypes

    UpdateOnceInitialized

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

    UsePersistentObjects

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

    WorldMeshLevelOfDetail

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

    Methods

    Enable()

    Declaration
    public override void Enable()

    Initialize()

    Declaration
    public override void Initialize()

    Resume()

    Declaration
    public override void Resume()

    SaveScene(String)

    Declaration
    public void SaveScene(string filenamePrefix)
    Parameters
    Type Name Description
    String filenamePrefix

    Suspend()

    Declaration
    public override void Suspend()

    TryFindCentermostPlacement(Int32, Vector2, out Vector3)

    Declaration
    public bool TryFindCentermostPlacement(int quadId, Vector2 objExtents, out Vector3 placementPosOnQuad)
    Parameters
    Type Name Description
    Int32 quadId
    Vector2 objExtents
    Vector3 placementPosOnQuad
    Returns
    Type Description
    Boolean

    TryGetOcclusionMask(Int32, UInt16, UInt16, out Byte[])

    Gets the occlusion mask from a scene quad

    Declaration
    public bool TryGetOcclusionMask(int quadId, ushort textureWidth, ushort textureHeight, out byte[] mask)
    Parameters
    Type Name Description
    Int32 quadId

    Guid of the quad

    UInt16 textureWidth

    Width of the mask

    UInt16 textureHeight

    Height of the mask

    Byte[] mask

    Mask result

    Returns
    Type Description
    Boolean

    Returns false if fails to get the mask

    UpdateOnDemand()

    Declaration
    public void UpdateOnDemand()

    Implements

    IMixedRealitySceneUnderstandingObserver
    In This Article
    Back to top Generated by DocFX