프로퍼티 | 타입 | 설명 | |
---|---|---|---|
m_canvas | Canvas | ||
m_markPrefabs | GameObject[] | ||
m_pointCloud | TangoPointCloud, | ||
m_prefabTouchEffect | |||
m_savingText |
메소드 | 설명 | |
---|---|---|
OnApplicationPause ( bool pauseStatus ) : void |
Applicaiton onPause / onResume callback.
|
|
OnGUI ( ) : void |
Unity OnGUI function. Mainly for removing markers.
|
|
OnTangoDepthAvailable ( |
This is called each time new depth data is available. On the Tango tablet, the depth callback occurs at 5 Hz.
|
|
OnTangoEventAvailableEventHandler ( Tango tangoEvent ) : void |
This is called each time a Tango event happens.
|
|
OnTangoPoseAvailable ( Tango poseData ) : void |
OnTangoPoseAvailable event from Tango. In this function, we only listen to the Start-Of-Service with respect to Area-Description frame pair. This pair indicates a relocalization or loop closure event happened, base on that, we either start the initialize the interaction or do a bundle adjustment for all marker position.
|
|
Save ( ) : void |
Save the game. Save will trigger 3 things: 1. Save the Area Description if the learning mode is on. 2. Bundle adjustment for all markers's position, please see _UpdateMarkersForLoopClosures() function header for more details. 3. Save all markers to xml, save the Area Description if the learning mode is on. 4. Reload the scene.
|
|
SetCurrentMarkType ( int type ) : void |
Set the marker type.
|
|
Start ( ) : void |
Unity Start function. We find and assign pose controller and tango applicaiton, and register this class to callback events.
|
|
Update ( ) : void |
Unity Update function. Mainly handle the touch event and place mark in place.
|
메소드 | 설명 | |
---|---|---|
_DoSaveCurrentAreaDescription ( ) : IEnumerator |
Actually do the Area Description save.
|
|
_LoadMarkerFromDisk ( ) : void |
Load marker list xml from application storage.
|
|
_SaveMarkerToDisk ( ) : void |
Write marker list to an xml file stored in application storage.
|
|
_UpdateMarkersForLoopClosures ( ) : void |
Correct all saved marks when loop closure happens. When Tango Service is in learning mode, the drift will accumulate overtime, but when the system sees a pre-exsiting area, it will do a operation to correct all previously saved poses (the pose you can query with GetPoseAtTime). This operation is called loop closure. When loop closure happens, we will need to re-query all previously saved marker position in order to achieve the best result. This function is doing the querying job based on timestamp.
|
|
_WaitForDepthAndFindPlane ( Vector2 touchPosition ) : IEnumerator |
Wait for the next depth update, then find the plane at the touch position.
|
|
_WorldBoundsToScreen ( Camera cam, Bounds bounds ) : Rect |
Convert a 3D bounding box into a 2D Rect.
|
public OnApplicationPause ( bool pauseStatus ) : void | ||
pauseStatus | bool | |
리턴 | void |
public OnTangoDepthAvailable ( |
||
tangoDepth | Tango depth. | |
리턴 | void |
public OnTangoEventAvailableEventHandler ( Tango tangoEvent ) : void | ||
tangoEvent | Tango | Tango event. |
리턴 | void |
public OnTangoPoseAvailable ( Tango poseData ) : void | ||
poseData | Tango | Returned pose data from TangoService. |
리턴 | void |
public SetCurrentMarkType ( int type ) : void | ||
type | int | Marker type. |
리턴 | void |
public RectTransform,UnityEngine m_prefabTouchEffect | ||
리턴 |