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

List controller of the scrolling list. This list controller present a toggle group of Tango space Area Descriptions. The list class also has interface to start the game and connect to Tango Service.
Наследование: MonoBehaviour, ITangoLifecycle
Показать файл Открыть проект

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

Свойство Тип Описание
m_enableLearningToggle Toggle,
m_gameControlPanel GameObject
m_guiController AreaLearningInGameController,
m_listContentParent UnityEngine.RectTransform
m_listElement GameObject
m_poseController TangoARPoseController,
m_toggleGroup UnityEngine.UI.ToggleGroup

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

Метод Описание
OnTangoPermissions ( bool permissionsGranted ) : void

Internal callback when a permissions event happens.

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

Unity Start function. This function is responsible for connecting callbacks, set up TangoApplication and initialize the data list.

StartGame ( bool isNewAreaDescription ) : void

Start the game. This will start the service connection, and start pose estimation from Tango Service.

Update ( ) : void

Unity Update function. Application will be closed when click the back button.

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

Метод Описание
_OnToggleChanged ( AreaDescription item, bool value ) : void

Callback function when toggle button is selected.

_PopulateList ( ) : void

Refresh the scrolling list's content for both list. This function will query from the Tango API for the Tango space Area Description. Also, when it populates the scrolling list content, it will connect the delegate for each button in the list. The delegate is responsible for the actual import/export through the Tango API.

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

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

Internal callback when a permissions event happens.
public OnTangoPermissions ( bool permissionsGranted ) : void
permissionsGranted bool If set to true permissions granted.
Результат 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() публичный Метод

Unity Start function. This function is responsible for connecting callbacks, set up TangoApplication and initialize the data list.
public Start ( ) : void
Результат void

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

Start the game. This will start the service connection, and start pose estimation from Tango Service.
public StartGame ( bool isNewAreaDescription ) : void
isNewAreaDescription bool If set to true game with start to learn a new Area /// Description.
Результат void

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

Unity Update function. Application will be closed when click the back button.
public Update ( ) : void
Результат void

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

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

Enable learning mode toggle. Learning Mode allows the loaded Area Description to be extended with more knowledge about the area..
public Toggle, m_enableLearningToggle
Результат Toggle,

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

Control panel game object. The panel will be enabled when the game starts.
public GameObject m_gameControlPanel
Результат GameObject

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

The GUI controller. GUI controller will be enabled when the game starts.
public AreaLearningInGameController, m_guiController
Результат AreaLearningInGameController,

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

The container panel of the Tango space Area Description scrolling list.
public RectTransform,UnityEngine m_listContentParent
Результат UnityEngine.RectTransform

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

The prefab of a standard button in the scrolling list.
public GameObject m_listElement
Результат GameObject

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

The reference of the TangoDeltaPoseController object. TangoDeltaPoseController listens to pose updates and applies the correct pose to itself and its built-in camera.
public TangoARPoseController, m_poseController
Результат TangoARPoseController,

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

Toggle group for the Area Description list. You can only toggle one Area Description at a time. After we get the list of Area Description from Tango, they are all added to this toggle group.
public ToggleGroup,UnityEngine.UI m_toggleGroup
Результат UnityEngine.UI.ToggleGroup