Tilt Five Unity SDK 1.4.2
Loading...
Searching...
No Matches
TiltFive.Glasses Class Referencesealed

The Glasses API and runtime. More...

Inheritance diagram for TiltFive.Glasses:
TiltFive.Singleton< T >

Classes

class  DisplayInfo

Public Types

enum  AREyes { EYE_LEFT = 0 , EYE_RIGHT , EYE_MAX }

Static Public Member Functions

static bool IsTracked (PlayerIndex playerIndex=PlayerIndex.One)
 Indicate if the specified glasses are tracked.
static bool TryGetDisplayInfo (PlayerIndex playerIndex, out DisplayInfo displayInfo)
 Gets the display info associated with the specified player's glasses.
static bool TryGetFriendlyName (PlayerIndex playerIndex, out string friendlyName)
 Gets the friendly name associated with the specified player's glasses in the Tilt Five Control Panel.
static bool TryGetPose (PlayerIndex playerIndex, out Pose pose)
 Attempts to get the position and orientation of the specified player's glasses.
static bool TryGetPreviewPose (PlayerIndex playerIndex, out Pose pose)
 Attempts to get the position and orientation of the specified player's glasses, smoothed for on-screen preview.
static GameObject GetPoseRoot (PlayerIndex playerIndex)
 Gets the pose root GameObject for the specified player.
static Camera GetLeftEye (PlayerIndex playerIndex)
 Gets the left eye camera for the specified player's glasses.
static Camera GetRightEye (PlayerIndex playerIndex)
 Gets the right eye camera for the specified player's glasses.
static bool headPoseUpdated (PlayerIndex playerIndex=PlayerIndex.One)
 Returns a boolean indication that the head pose was successfully updated.
static void Reset (GlassesSettings glassesSettings, SpectatorSettings spectatorSettings=null, PlayerIndex playerIndex=PlayerIndex.None)
 Reset this T:TiltFive.Glasses.
static bool Validate (GlassesSettings glassesSettings, SpectatorSettings spectatorSettings=null, PlayerIndex playerIndex=PlayerIndex.One)
 Validates the specified glassesSettings with the specified glasses core.
static void Update (GlassesSettings glassesSettings, ScaleSettings scaleSettings, GameBoardSettings gameBoardSettings)
 Updates this T:TiltFive.Glasses.
static bool IsConnected (PlayerIndex playerIndex=PlayerIndex.One)
 Indicate if the specified glasses are connected.
static void ScanForGlasses ()

Properties

static bool updated [get]
 Gets a value indicating whether this T:TiltFive.Glasses is updated.
static bool configured [get]
 Gets a value indicating whether this T:TiltFive.Glasses is configured.
static Vector3 position [get]
 Gets the head pose position.
static Quaternion rotation [get]
 Gets the head pose rotation.
static Vector3 forward [get]
 Gets the head orientation's forward vector.
static Vector3 right [get]
 Gets the head orientation's right vector.
static Vector3 up [get]
 Gets the head orientation's up vector.
static Vector3 leftEyePosition [get]
 Gets the left eye position.
static Vector3 rightEyePosition [get]
 Gets the right eye position.
static bool glassesAvailable [get]
 Indicates whether the glasses are plugged in and functioning.
Properties inherited from TiltFive.Singleton< T >
static T Instance [get]

Additional Inherited Members

Protected Member Functions inherited from TiltFive.Singleton< T >
 Singleton ()

Detailed Description

The Glasses API and runtime.

Member Enumeration Documentation

◆ AREyes

Enumerator
EYE_LEFT 
EYE_RIGHT 
EYE_MAX 

Member Function Documentation

◆ GetLeftEye()

Camera TiltFive.Glasses.GetLeftEye ( PlayerIndex playerIndex)
inlinestatic

Gets the left eye camera for the specified player's glasses.

Parameters
playerIndex
Returns
Returns null if the specified player is not connected.

◆ GetPoseRoot()

GameObject TiltFive.Glasses.GetPoseRoot ( PlayerIndex playerIndex)
inlinestatic

Gets the pose root GameObject for the specified player.

This GameObject's pose is driven by the player's head position over the gameboard. Parented underneath this GameObject are the two eye cameras and an instance of the developer-provided prefab in the player's Glasses settings.

Parameters
playerIndex
Returns
Returns null if the specified player is not connected.

◆ GetRightEye()

Camera TiltFive.Glasses.GetRightEye ( PlayerIndex playerIndex)
inlinestatic

Gets the right eye camera for the specified player's glasses.

Parameters
playerIndex
Returns
Returns null if the specified player is not connected.

◆ headPoseUpdated()

bool TiltFive.Glasses.headPoseUpdated ( PlayerIndex playerIndex = PlayerIndex::One)
inlinestatic

Returns a boolean indication that the head pose was successfully updated.

Returns
true, if the head pose was updated, false otherwise.
Parameters
glassesHandleThe specified glasses. If null is provided, this uses the default glasses.

◆ IsConnected()

bool TiltFive.Glasses.IsConnected ( PlayerIndex playerIndex = PlayerIndex::One)
inlinestatic

Indicate if the specified glasses are connected.

Returns
true if the glasses are connected, false otherwise.
Parameters
glassesHandleGlasses handle to check.

◆ IsTracked()

bool TiltFive.Glasses.IsTracked ( PlayerIndex playerIndex = PlayerIndex::One)
inlinestatic

Indicate if the specified glasses are tracked.

Returns
true if the glasses are tracked, false otherwise.
Parameters
playerIndexIf not provided, the Player 1's glasses are checked.

◆ Reset()

void TiltFive.Glasses.Reset ( GlassesSettings glassesSettings,
SpectatorSettings spectatorSettings = null,
PlayerIndex playerIndex = PlayerIndex::None )
inlinestatic

Reset this T:TiltFive.Glasses.

Parameters
glassesSettingsGlasses settings for configuring the specified glassesCore.
playerIndexThe specified player. If None is provided, this resets all glasses.

◆ ScanForGlasses()

void TiltFive.Glasses.ScanForGlasses ( )
inlinestatic

◆ TryGetDisplayInfo()

bool TiltFive.Glasses.TryGetDisplayInfo ( PlayerIndex playerIndex,
out DisplayInfo displayInfo )
inlinestatic

Gets the display info associated with the specified player's glasses.

Parameters
playerIndex
displayInfo
Returns
Returns false and sets displayInfo to null if there was a problem getting the friendly name for this player; otherwise true. This can happen if the provided PlayerIndex is invalid, the player is not connected, or if the user hasn't yet set a friendly name for this particular set of glasses.

◆ TryGetFriendlyName()

bool TiltFive.Glasses.TryGetFriendlyName ( PlayerIndex playerIndex,
out string friendlyName )
inlinestatic

Gets the friendly name associated with the specified player's glasses in the Tilt Five Control Panel.

Parameters
playerIndex
friendlyName
Returns
Returns false and sets friendlyName to null if there was a problem getting the friendly name for this player; otherwise true. This can happen if the provided PlayerIndex is invalid, the player is not connected, or if the user hasn't yet set a friendly name for this particular set of glasses.

◆ TryGetPose()

bool TiltFive.Glasses.TryGetPose ( PlayerIndex playerIndex,
out Pose pose )
inlinestatic

Attempts to get the position and orientation of the specified player's glasses.

Parameters
playerIndex
pose
Returns
Returns false along with an empty pose if something goes wrong.

◆ TryGetPreviewPose()

bool TiltFive.Glasses.TryGetPreviewPose ( PlayerIndex playerIndex,
out Pose pose )
inlinestatic

Attempts to get the position and orientation of the specified player's glasses, smoothed for on-screen preview.

Parameters
playerIndex
pose
Returns
Returns false along with an empty pose if something goes wrong.

◆ Update()

void TiltFive.Glasses.Update ( GlassesSettings glassesSettings,
ScaleSettings scaleSettings,
GameBoardSettings gameBoardSettings )
inlinestatic

Updates this T:TiltFive.Glasses.

Parameters
glassesSettingsGlasses settings for the update.

◆ Validate()

bool TiltFive.Glasses.Validate ( GlassesSettings glassesSettings,
SpectatorSettings spectatorSettings = null,
PlayerIndex playerIndex = PlayerIndex::One )
inlinestatic

Validates the specified glassesSettings with the specified glasses core.

Returns
true, if the glasses core is valid with the given settings, false otherwise.
Parameters
glassesSettingsGlasses settings.
playerIndexThe specified glasses to validate. If None is provided, this uses the default glasses.

Property Documentation

◆ configured

bool TiltFive.Glasses.configured
staticget

Gets a value indicating whether this T:TiltFive.Glasses is configured.

true if player 1's glasses are connected and they've been configured; otherwise, false.

◆ forward

Vector3 TiltFive.Glasses.forward
staticget

Gets the head orientation's forward vector.

The forward vector of player 1's glasses (if connected, otherwise the default forward vector)

◆ glassesAvailable

bool TiltFive.Glasses.glassesAvailable
staticget

Indicates whether the glasses are plugged in and functioning.

◆ leftEyePosition

Vector3 TiltFive.Glasses.leftEyePosition
staticget

Gets the left eye position.

The left eye position of player 1's glasses (if connected, otherwise the zero vector)

◆ position

Vector3 TiltFive.Glasses.position
staticget

Gets the head pose position.

The position of player 1's glasses (if connected, otherwise a zero vector)

◆ right

Vector3 TiltFive.Glasses.right
staticget

Gets the head orientation's right vector.

The right vector of player 1's glasses (if connected, otherwise the default right vector)

◆ rightEyePosition

Vector3 TiltFive.Glasses.rightEyePosition
staticget

Gets the right eye position.

The right eye position of player 1's glasses (if connected, otherwise the zero vector)

◆ rotation

Quaternion TiltFive.Glasses.rotation
staticget

Gets the head pose rotation.

The rotation of player 1's glasses (if connected, otherwise the identity quaternion)

◆ up

Vector3 TiltFive.Glasses.up
staticget

Gets the head orientation's up vector.

The up vector of player 1's glasses (if connected, otherwise the default up vector)

◆ updated

bool TiltFive.Glasses.updated
staticget

Gets a value indicating whether this T:TiltFive.Glasses is updated.

true if player 1's glasses are connected and their glasses pose has been updated; otherwise, false.


The documentation for this class was generated from the following file: