C# Class TangoPointCloud, project-tango-poc

Point cloud visualize using depth frame API.
Inheritance: MonoBehaviour, ITangoDepth
Mostrar archivo Open project: stetro/project-tango-poc Class Usage Examples

Public Properties

Property Type Description
m_updatePointsMesh bool
m_useAreaDescriptionPose bool

Public Methods

Method Description
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.

Private Methods

Method Description
_SetUpCameraData ( ) : void

Sets up extrinsic matrixes and camera intrinsics for this hardware.

Method Details

FindClosestPoint() public method

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.
return int

FindPlane() public method

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.
return bool

OnTangoDepthAvailable() public method

Callback that gets called when depth is available from the Tango Service.
public OnTangoDepthAvailable ( TangoUnityDepth tangoDepth ) : void
tangoDepth Tango.TangoUnityDepth Depth information from Tango.
return void

Start() public method

Use this for initialization.
public Start ( ) : void
return void

Property Details

m_updatePointsMesh public_oe property

If set, the point cloud's mesh gets updated (much slower, useful for debugging).
public bool m_updatePointsMesh
return bool

m_useAreaDescriptionPose public_oe property

If set, the point cloud will be transformed using ADF pose (device with respect to ADF).
public bool m_useAreaDescriptionPose
return bool