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
Mostrar archivo Open project: stetro/project-tango-poc

Public Properties

Property 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

Public Methods

Method 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

Method 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 method

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

OnTangoServiceConnected() public method

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

OnTangoServiceDisconnected() public method

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

Start() public method

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

StartGame() public method

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

Update() public method

Unity Update function. Application will be closed when click the back button.
public Update ( ) : void
return 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
return Toggle,

m_gameControlPanel public_oe property

Control panel game object. The panel will be enabled when the game starts.
public GameObject m_gameControlPanel
return GameObject

m_guiController public_oe property

The GUI controller. GUI controller will be enabled when the game starts.
public AreaLearningInGameController, m_guiController
return AreaLearningInGameController,

m_listContentParent public_oe property

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

m_listElement public_oe property

The prefab of a standard button in the scrolling list.
public GameObject m_listElement
return 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
return 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
return UnityEngine.UI.ToggleGroup