Table of Contents

Class SparseSpatialMapController

命名空间
easyar
程序集
EasyAR.Sense.dll

在场景中由easyar.SparseSpatialMap跟踪的地图的MonoBehaviour

[RequireComponent(typeof(SparseSpatialMapPointCloudRenderer))]
public class SparseSpatialMapController : TargetController
继承
SparseSpatialMapController
继承成员

属性

Info

地图信息,仅在MonoBehaviour.Start之后可用。

public SparseSpatialMapController.SparseSpatialMapInfo Info { get; }

IsDirectlyTracked

目标是否被直接跟踪。

public bool IsDirectlyTracked { get; }

PointCloud

点云数据。仅在TargetFound之后可用。

public List<Vector3> PointCloud { get; }

PointCloudRenderer

点云渲染器。

public SparseSpatialMapPointCloudRenderer PointCloudRenderer { get; }

Source

创建map的数据来源。在MonoBehaviour.Start前修改才有效。

public SparseSpatialMapController.SourceData Source { get; set; }

Tracker

加载target的SparseSpatialMapTrackerFrameFilter。如果设为null,map将会被从之前设置的MapWorker中卸载。可随时修改,加载只会在session运行时发生。

public SparseSpatialMapTrackerFrameFilter Tracker { get; set; }

方法

HitTest(Vector2)

在当前点云中进行Hit Test,得到距离相机从近到远一条射线上的n(n>=0)个位置坐标。pointInView 需要被归一化到[0, 1]^2。

仅在IsDirectlyTracked为true时可用。

public List<Vector3> HitTest(Vector2 pointInView)

参数

pointInView