SparseSpatialMapController Class¶
Description¶
MonoBehaviour which controls the map tracked by SparseSpatialMap in the scene.
Classes¶
public class SparseSpatialMapController.SparseSpatialMapInfo |
Sparse map information. |
public abstract class SparseSpatialMapController.SourceData |
Data for target creation. |
public class SparseSpatialMapController.MapManagerSourceData |
MapManager source for map creation. |
Properties¶
PointCloudRenderer¶
- C#
public SparseSpatialMapPointCloudRenderer PointCloudRenderer { get; }
Renderer of point cloud.
Info¶
- C#
public SparseSpatialMapController.SparseSpatialMapInfo Info { get; }
Map info. Only usable after MonoBehaviour .Start.
PointCloud¶
- C#
public List< Vector3 > PointCloud { get; }
Point cloud data. Only usable after TargetController.TargetFound .
Source¶
- C#
public SparseSpatialMapController.SourceData Source { get; set; }
Data source for map creation. Only effective if modified before MonoBehaviour .Start.
Tracker¶
- C#
public SparseSpatialMapTrackerFrameFilter Tracker { get; set; }
The SparseSpatialMapTrackerFrameFilter which loads the map. When set to null, the map will be unloaded from MapWorker previously set. Modify at any time, the load will happen only when the session is running.
IsDirectlyTracked¶
- C#
public bool IsDirectlyTracked { get; }
Is target being tracked directly.
ActiveController¶
- C#
public ActiveController ActiveController { get; }
GameObject .activeSelf controller.
Set MonoBehaviour .enabled to false to turn off control.
IsTracked¶
- C#
public bool IsTracked { get; }
Is target being tracked.
Events¶
TargetFound¶
- C#
public event Action TargetFound
Tracking target found event.
TargetLost¶
- C#
public event Action TargetLost
Tracking target lost event.
Methods¶
HitTest¶
Perform hit test against the point cloud. The results are returned sorted by their distance to the camera in ascending order. pointInView should be normalized to [0, 1]^2.
Only usable when SparseSpatialMapController.IsDirectlyTracked is true.