Class XRDepthSubsystem
An abstract class that provides a generic API for low-level depth detection features.
Inherited Members
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 sealed override 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 |
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 |
Overrides
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()