Class XRDepthSubsystem | AR Subsystems | 2.2.0-preview.6
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
    TrackingSubsystem<XRPointCloud, XRDepthSubsystemDescriptor>
    XRDepthSubsystem
    XRDepthSubsystemImpl
    Inherited Members
    TrackingSubsystem<XRPointCloud, XRDepthSubsystemDescriptor>.running
    TrackingSubsystem<XRPointCloud, XRDepthSubsystemDescriptor>.m_Running
    TrackingSubsystem<XRPointCloud, XRDepthSubsystemDescriptor>.GetChanges(Allocator)
    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

    Destroy()

    Destroy the depth subsystem.

    Declaration
    public override sealed void Destroy()

    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)

    GetInterface()

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

    Declaration
    protected abstract XRDepthSubsystem.IDepthApi GetInterface()
    Returns
    Type Description
    XRDepthSubsystem.IDepthApi

    An implementation of the XRDepthSubsystem.IDepthApi.

    GetPointCloudData(TrackableId, Allocator)

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

    Start()

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

    Declaration
    public override void Start()

    Stop()

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

    Declaration
    public override void Stop()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023