C# Класс TangoPointCloud, project-tango-poc

Point cloud visualize using depth frame API.
Наследование: MonoBehaviour, ITangoDepth
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
m_updatePointsMesh bool
m_useAreaDescriptionPose bool

Открытые методы

Метод Описание
FindClosestPoint ( Camera cam, Vector2 pos, int maxDist ) : int

Finds the closest point from a point cloud to a position on screen. NOTE: This is slow because it looks at every single point in the point cloud. Avoid calling this more than once a frame.

FindPlane ( Camera cam, Vector2 pos, Vector3 &planeCenter, Plane &plane ) : bool

Given a screen coordinate, find a plane that most closely fits depth values in that area. This assumes you are using this in an AR context.

OnTangoDepthAvailable ( TangoUnityDepth tangoDepth ) : void

Callback that gets called when depth is available from the Tango Service.

Start ( ) : void

Use this for initialization.

Приватные методы

Метод Описание
_SetUpCameraData ( ) : void

Sets up extrinsic matrixes and camera intrinsics for this hardware.

Описание методов

FindClosestPoint() публичный Метод

Finds the closest point from a point cloud to a position on screen. NOTE: This is slow because it looks at every single point in the point cloud. Avoid calling this more than once a frame.
public FindClosestPoint ( Camera cam, Vector2 pos, int maxDist ) : int
cam Camera The current camera.
pos Vector2 Position on screen (in pixels).
maxDist int The maximum pixel distance to allow.
Результат int

FindPlane() публичный Метод

Given a screen coordinate, find a plane that most closely fits depth values in that area. This assumes you are using this in an AR context.
public FindPlane ( Camera cam, Vector2 pos, Vector3 &planeCenter, Plane &plane ) : bool
cam Camera The Unity camera.
pos Vector2 The point in screen space to perform detection on.
planeCenter Vector3 Filled in with the center of the plane in Unity world space.
plane Plane Filled in with a model of the plane in Unity world space.
Результат bool

OnTangoDepthAvailable() публичный Метод

Callback that gets called when depth is available from the Tango Service.
public OnTangoDepthAvailable ( TangoUnityDepth tangoDepth ) : void
tangoDepth Tango.TangoUnityDepth Depth information from Tango.
Результат void

Start() публичный Метод

Use this for initialization.
public Start ( ) : void
Результат void

Описание свойств

m_updatePointsMesh публичное свойство

If set, the point cloud's mesh gets updated (much slower, useful for debugging).
public bool m_updatePointsMesh
Результат bool

m_useAreaDescriptionPose публичное свойство

If set, the point cloud will be transformed using ADF pose (device with respect to ADF).
public bool m_useAreaDescriptionPose
Результат bool