C# Class 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.
Inheritance: MonoBehaviour, ITangoLifecycle
Afficher le fichier Open project: stetro/project-tango-poc

Méthodes publiques

Свойство Type Description
m_enableLearningToggle Toggle,
m_gameControlPanel GameObject
m_guiController AreaLearningInGameController,
m_listContentParent UnityEngine.RectTransform
m_listElement GameObject
m_poseController TangoARPoseController,
m_toggleGroup UnityEngine.UI.ToggleGroup

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
_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.

Method Details

OnTangoPermissions() public méthode

Internal callback when a permissions event happens.
public OnTangoPermissions ( bool permissionsGranted ) : void
permissionsGranted bool If set to true permissions granted.
Résultat void

OnTangoServiceConnected() public méthode

This is called when succesfully connected to the Tango service.
public OnTangoServiceConnected ( ) : void
Résultat void

OnTangoServiceDisconnected() public méthode

This is called when disconnected from the Tango service.
public OnTangoServiceDisconnected ( ) : void
Résultat void

Start() public méthode

Unity Start function. This function is responsible for connecting callbacks, set up TangoApplication and initialize the data list.
public Start ( ) : void
Résultat void

StartGame() public méthode

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.
Résultat void

Update() public méthode

Unity Update function. Application will be closed when click the back button.
public Update ( ) : void
Résultat void

Property Details

m_enableLearningToggle public_oe property

Enable learning mode toggle. Learning Mode allows the loaded Area Description to be extended with more knowledge about the area..
public Toggle, m_enableLearningToggle
Résultat Toggle,

m_gameControlPanel public_oe property

Control panel game object. The panel will be enabled when the game starts.
public GameObject m_gameControlPanel
Résultat GameObject

m_guiController public_oe property

The GUI controller. GUI controller will be enabled when the game starts.
public AreaLearningInGameController, m_guiController
Résultat AreaLearningInGameController,

m_listContentParent public_oe property

The container panel of the Tango space Area Description scrolling list.
public RectTransform,UnityEngine m_listContentParent
Résultat UnityEngine.RectTransform

m_listElement public_oe property

The prefab of a standard button in the scrolling list.
public GameObject m_listElement
Résultat GameObject

m_poseController public_oe property

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
Résultat TangoARPoseController,

m_toggleGroup public_oe property

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
Résultat UnityEngine.UI.ToggleGroup