SparseSpatialMapController Class¶
Description¶
MonoBehaviour which controls the map generated from SparseSpatialMap in the scene.
Map info data will be loaded separately. It will start after session start. The full data loading will happen only once in the life time, if the session stops before load finish, it will be restarted in the next session start.
Enums¶
public enum SparseSpatialMapController.ActiveControlStrategy |
Strategy to control the GameObject .active. |
public enum SparseSpatialMapController.DataSource |
Map data source type. |
Classes¶
public class SparseSpatialMapController.SparseSpatialMapInfo |
Sparse map information. |
public class SparseSpatialMapController.MapManagerSourceData |
MapManager source for map creation. |
public class SparseSpatialMapController.ParticleParameter |
Parameters for point cloud particles rendering. |
MonoBehaviour Messages¶
private void Awake() |
private void Start() |
private void OnDestroy() |
Fields¶
PointCloudParticleSystem¶
- C#
public ParticleSystem PointCloudParticleSystem
The ParticleSystem used for point cloud rendering.
ActiveControl¶
- C#
public SparseSpatialMapController.ActiveControlStrategy ActiveControl
Strategy to control the GameObject .active. If you are willing to control GameObject .active or there are other components controlling GameObject .active, make sure to set it to SparseSpatialMapController.ActiveControlStrategy.None .
SourceType¶
- C#
public SparseSpatialMapController.DataSource SourceType
Map data source. Set before MonoBehaviour .Start
MapManagerSource¶
- C#
public SparseSpatialMapController.MapManagerSourceData MapManagerSource
MapManager source for map creation. Valid when SparseSpatialMapController.SourceType == SparseSpatialMapController.DataSource.MapManager . Set before MonoBehaviour .Start
MapInfoSource¶
- C#
public SparseSpatialMapController.SparseSpatialMapInfo MapInfoSource
MapInfo source for map creation. Valid when SparseSpatialMapController.SourceType == SparseSpatialMapController.DataSource.MapInfo . Set before MonoBehaviour .Start
Properties¶
MapInfo¶
- C#
public SparseSpatialMapController.SparseSpatialMapInfo MapInfo { get; }
Map information. Accessible after MapInfoAvailable event.
MapWorker¶
- C#
public SparseSpatialMapWorkerFrameFilter MapWorker { get; set; }
The SparseSpatialMapWorkerFrameFilter 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.
PointCloudParticleParameter¶
- C#
public SparseSpatialMapController.ParticleParameter PointCloudParticleParameter { get; set; }
Parameters for point cloud particles rendering.
PointCloud¶
- C#
public List< Vector3 > PointCloud { get; }
Point cloud data.
ShowPointCloud¶
- C#
public bool ShowPointCloud { get; set; }
Show or hide point cloud.
IsLocalizing¶
- C#
public bool IsLocalizing { get; }
Is the map being localized at the moment.
Events¶
MapInfoLoad¶
- C#
public event Action<bool> MapInfoLoad
Map info finish load (not load into a tracker).
MapLocalized¶
- C#
public event Action MapLocalized
Map localized event.
MapStopLocalize¶
- C#
public event Action MapStopLocalize
Stop map localization 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.