Class IUsesPointCloudMethods
Namespace: Unity.MARS.Providers
Syntax
public static class IUsesPointCloudMethods : object
Methods
GetPoints(IUsesPointCloud)
Get the latest available point cloud data
Declaration
public static Dictionary<MarsTrackableId, PointCloudData> GetPoints(this IUsesPointCloud obj)
Parameters
Type | Name | Description |
---|---|---|
IUsesPointCloud | obj |
Returns
Type | Description |
---|---|
Dictionary<MarsTrackableId, PointCloudData> | The point cloud data |
StartDetectingPoints(IUsesPointCloud)
Start detecting point clouds. Point cloud detection is enabled on initialization, so this is only necessary after calling StopDetecting.
Declaration
public static void StartDetectingPoints(this IUsesPointCloud obj)
Parameters
Type | Name | Description |
---|---|---|
IUsesPointCloud | obj |
StopDetectingPoints(IUsesPointCloud)
Stop detecting point clouds. This will happen automatically on destroying the session. It is only necessary to call this method to pause plane detection while maintaining camera tracking
Declaration
public static void StopDetectingPoints(this IUsesPointCloud obj)
Parameters
Type | Name | Description |
---|---|---|
IUsesPointCloud | obj |
SubscribePointCloudUpdated(IUsesPointCloud, Action<Dictionary<MarsTrackableId, PointCloudData>>)
Subscribe to the pointCloudUpdated event, which is called whenever the point cloud is updated
Declaration
public static void SubscribePointCloudUpdated(this IUsesPointCloud obj, Action<Dictionary<MarsTrackableId, PointCloudData>> pointCloudUpdated)
Parameters
Type | Name | Description |
---|---|---|
IUsesPointCloud | obj | |
Action<Dictionary<MarsTrackableId, PointCloudData>> | pointCloudUpdated | The delegate to subscribe |
UnsubscribePointCloudUpdated(IUsesPointCloud, Action<Dictionary<MarsTrackableId, PointCloudData>>)
Unsubscribe a delegate from the pointCloudUpdated event
Declaration
public static void UnsubscribePointCloudUpdated(this IUsesPointCloud obj, Action<Dictionary<MarsTrackableId, PointCloudData>> pointCloudUpdated)
Parameters
Type | Name | Description |
---|---|---|
IUsesPointCloud | obj | |
Action<Dictionary<MarsTrackableId, PointCloudData>> | pointCloudUpdated | The delegate to unsubscribe |