Class XRDepthSubsystem | AR Subsystems | 3.0.0
docs.unity3d.com
    Show / Hide Table of Contents

    Class XRDepthSubsystem

    An abstract class that provides a generic API for low-level depth detection features.

    Inheritance
    Object
    XRSubsystem<XRDepthSubsystemDescriptor>
    TrackingSubsystem<XRPointCloud, XRDepthSubsystemDescriptor>
    XRDepthSubsystem
    XRDepthSubsystemImpl
    Inherited Members
    TrackingSubsystem<XRPointCloud, XRDepthSubsystemDescriptor>.GetChanges(Allocator)
    XRSubsystem<XRDepthSubsystemDescriptor>.running
    XRSubsystem<XRDepthSubsystemDescriptor>.Destroy()
    XRSubsystem<XRDepthSubsystemDescriptor>.Start()
    XRSubsystem<XRDepthSubsystemDescriptor>.Stop()
    Namespace: UnityEngine.XR.ARSubsystems
    Syntax
    public abstract class XRDepthSubsystem : TrackingSubsystem<XRPointCloud, XRDepthSubsystemDescriptor>
    Remarks

    This class can be used to access depth detection features in your app via accessing the generic API. It can also be extended to provide an implementation of a provider which provides the depth detection data to the higher level code.

    Constructors

    XRDepthSubsystem()

    Constructs a depth subsystem. Do not invoked directly; call Create on the XRDepthSubsystemDescriptor instead.

    Declaration
    protected XRDepthSubsystem()

    Methods

    CreateProvider()

    Implement this and return an instance of the XRDepthSubsystem.Provider.

    Declaration
    protected abstract XRDepthSubsystem.Provider CreateProvider()
    Returns
    Type Description
    XRDepthSubsystem.Provider

    An implementation of the XRDepthSubsystem.Provider.

    GetChanges(Allocator)

    Get the changes (added, updated, and removed) point clouds since the last call to GetChanges(Allocator).

    Declaration
    public override TrackableChanges<XRPointCloud> GetChanges(Allocator allocator)
    Parameters
    Type Name Description
    Allocator allocator

    An Allocator to use when allocating the returned NativeArrays.

    Returns
    Type Description
    TrackableChanges<XRPointCloud>

    TrackableChanges<T> describing the point clouds that have been added, updated, and removed since the last call to GetChanges(Allocator). The caller owns the memory allocated with Allocator.

    Overrides
    UnityEngine.XR.ARSubsystems.TrackingSubsystem<UnityEngine.XR.ARSubsystems.XRPointCloud, UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor>.GetChanges(Allocator)

    GetPointCloudData(TrackableId, Allocator)

    Declaration
    public XRPointCloudData GetPointCloudData(TrackableId trackableId, Allocator allocator)
    Parameters
    Type Name Description
    TrackableId trackableId
    Allocator allocator
    Returns
    Type Description
    XRPointCloudData

    OnDestroyed()

    Destroy the depth subsystem.

    Declaration
    protected override sealed void OnDestroyed()
    Overrides
    UnityEngine.XR.ARSubsystems.XRSubsystem<UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor>.OnDestroyed()

    OnStart()

    Start the depth subsystem, i.e., start collecting depth data.

    Declaration
    protected override sealed void OnStart()
    Overrides
    UnityEngine.XR.ARSubsystems.XRSubsystem<UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor>.OnStart()

    OnStop()

    Stop the subsystem, i.e., stop collecting depth data.

    Declaration
    protected override sealed void OnStop()
    Overrides
    UnityEngine.XR.ARSubsystems.XRSubsystem<UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor>.OnStop()
    Back to top Copyright © 2019 Unity Technologies
    Generated by DocFX