Class XRDepthSubsystem
An abstract class that provides a generic API for low-level depth detection features.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.ARSubsystems
Syntax
public class XRDepthSubsystem : TrackingSubsystem<XRPointCloud, XRDepthSubsystem, XRDepthSubsystemDescriptor, XRDepthSubsystem.Provider>, ISubsystem
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.
Methods
GetChanges(Allocator)
Get the changes to point clouds (added, updated, and removed) 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
GetPointCloudData(TrackableId, Allocator)
Retrieve point cloud data (positions, confidence values, and identifiers)
for the point cloud with the given trackableId
.
Declaration
public XRPointCloudData GetPointCloudData(TrackableId trackableId, Allocator allocator)
Parameters
Type | Name | Description |
---|---|---|
TrackableId | trackableId | The point cloud for which to retrieve data. |
Allocator | allocator | The allocator to use when creating the |
Returns
Type | Description |
---|---|
XRPointCloudData | A new XRPointCloudData with newly allocated |