C# 클래스 TangoARScreen, project-tango-poc

상속: MonoBehaviour, ITangoLifecycle, IExperimentalTangoVideoOverlay
파일 보기 프로젝트 열기: stetro/project-tango-poc 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
m_enableOcclusion bool
m_screenMaterial Material

공개 메소드들

메소드 설명
CameraImagePointToViewportPoint ( Vector2 pos ) : Vector2

Converts a color camera position into its corresponding normalized Unity viewport position. image.

OnExperimentalTangoImageAvailable ( TangoEnums cameraId ) : void

This will be called when a new frame is available from the camera. The first scan-line of the color image is reserved for metadata instead of image pixels.

OnTangoPermissions ( bool permissionsGranted ) : void

This is called when the permission granting process is finished.

OnTangoServiceConnected ( ) : void

This is called when succesfully connected to the Tango service.

OnTangoServiceDisconnected ( ) : void

This is called when disconnected from the Tango service.

Start ( ) : void

Initialize the AR Screen.

ViewportPointToCameraImagePoint ( Vector2 pos ) : Vector2

Converts a normalized Unity viewport position into its corresponding normalized position on the color camera image.

비공개 메소드들

메소드 설명
_CameraUpdateForIntrinsics ( Camera cam, TangoCameraIntrinsics intrinsics, float uOffset, float vOffset ) : void

Update a camera so its perspective lines up with the color camera's perspective.

_Frustum ( float left, float right, float bottom, float top, float zNear, float zFar ) : Matrix4x4
_MeshUpdateForIntrinsics ( Mesh mesh, float uOffset, float vOffset ) : void

Update a mesh so it can be used for the Video Overlay image plane. The image plane is drawn without any projection or view matrix transforms, so it must line up exactly with normalized screen space. The texture coordinates of the mesh are adjusted so it properly clips the image plane.

메소드 상세

CameraImagePointToViewportPoint() 공개 메소드

Converts a color camera position into its corresponding normalized Unity viewport position. image.
public CameraImagePointToViewportPoint ( Vector2 pos ) : Vector2
pos Vector2 Normalized position for the 3D viewport.
리턴 Vector2

OnExperimentalTangoImageAvailable() 공개 메소드

This will be called when a new frame is available from the camera. The first scan-line of the color image is reserved for metadata instead of image pixels.
public OnExperimentalTangoImageAvailable ( TangoEnums cameraId ) : void
cameraId TangoEnums Camera identifier.
리턴 void

OnTangoPermissions() 공개 메소드

This is called when the permission granting process is finished.
public OnTangoPermissions ( bool permissionsGranted ) : void
permissionsGranted bool true if permissions were granted, otherwise false.
리턴 void

OnTangoServiceConnected() 공개 메소드

This is called when succesfully connected to the Tango service.
public OnTangoServiceConnected ( ) : void
리턴 void

OnTangoServiceDisconnected() 공개 메소드

This is called when disconnected from the Tango service.
public OnTangoServiceDisconnected ( ) : void
리턴 void

Start() 공개 메소드

Initialize the AR Screen.
public Start ( ) : void
리턴 void

ViewportPointToCameraImagePoint() 공개 메소드

Converts a normalized Unity viewport position into its corresponding normalized position on the color camera image.
public ViewportPointToCameraImagePoint ( Vector2 pos ) : Vector2
pos Vector2 Normalized position for the 3D viewport.
리턴 Vector2

프로퍼티 상세

m_enableOcclusion 공개적으로 프로퍼티

If set, m_updatePointsMesh in PointCloud also gets set. Then PointCloud material's renderqueue is set to background-1 so that PointCloud data gets written to Z buffer for Depth test with virtual objects in scene. Note 1: This is a very rudimentary way of doing occlusion and limited by the capabilities of depth camera. Note 2: To enable occlusion TangoPointCloud prefab must be present in the scene as well.
public bool m_enableOcclusion
리턴 bool

m_screenMaterial 공개적으로 프로퍼티

Set this to the AR Screen material.
public Material m_screenMaterial
리턴 Material