The Glasses API and runtime.
More...
|
| enum | AREyes { EYE_LEFT = 0
, EYE_RIGHT
, EYE_MAX
} |
|
| 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 () |
|
| 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.
|
| static T | Instance [get] |
The Glasses API and runtime.
Definition at line 34 of file Glasses.cs.
◆ AREyes
| enum TiltFive.Glasses.AREyes |
◆ GetLeftEye()
| Camera TiltFive.Glasses.GetLeftEye |
( |
PlayerIndex | playerIndex | ) |
|
|
inlinestatic |
Gets the left eye camera for the specified player's glasses.
- Parameters
-
- Returns
- Returns
null if the specified player is not connected.
Definition at line 319 of file Glasses.cs.
◆ 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
-
- Returns
- Returns
null if the specified player is not connected.
Definition at line 305 of file Glasses.cs.
◆ GetRightEye()
| Camera TiltFive.Glasses.GetRightEye |
( |
PlayerIndex | playerIndex | ) |
|
|
inlinestatic |
Gets the right eye camera for the specified player's glasses.
- Parameters
-
- Returns
- Returns
null if the specified player is not connected.
Definition at line 333 of file Glasses.cs.
◆ 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
-
| glassesHandle | The specified glasses. If null is provided, this uses the default glasses. |
Definition at line 351 of file Glasses.cs.
◆ 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
-
| glassesHandle | Glasses handle to check. |
Definition at line 404 of file Glasses.cs.
◆ 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
-
| playerIndex | If not provided, the Player 1's glasses are checked. |
Definition at line 174 of file Glasses.cs.
◆ Reset()
Reset this T:TiltFive.Glasses.
- Parameters
-
| glassesSettings | Glasses settings for configuring the specified glassesCore. |
| playerIndex | The specified player. If None is provided, this resets all glasses. |
Definition at line 368 of file Glasses.cs.
◆ ScanForGlasses()
| void TiltFive.Glasses.ScanForGlasses |
( |
| ) |
|
|
inlinestatic |
◆ TryGetDisplayInfo()
Gets the display info associated with the specified player's glasses.
- Parameters
-
- 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.
Definition at line 210 of file Glasses.cs.
◆ 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
-
- 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.
Definition at line 229 of file Glasses.cs.
◆ 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
-
- Returns
- Returns
false along with an empty pose if something goes wrong.
Definition at line 266 of file Glasses.cs.
◆ 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
-
- Returns
- Returns
false along with an empty pose if something goes wrong.
Definition at line 284 of file Glasses.cs.
◆ Update()
Updates this T:TiltFive.Glasses.
- Parameters
-
| glassesSettings | Glasses settings for the update. |
Definition at line 393 of file Glasses.cs.
◆ Validate()
Validates the specified glassesSettings with the specified glasses core.
- Returns
true, if the glasses core is valid with the given settings, false otherwise.
- Parameters
-
| glassesSettings | Glasses settings. |
| playerIndex | The specified glasses to validate. If None is provided, this uses the default glasses. |
Definition at line 383 of file Glasses.cs.
◆ 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.
Definition at line 113 of file Glasses.cs.
◆ 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)
Definition at line 131 of file Glasses.cs.
◆ glassesAvailable
| bool TiltFive.Glasses.glassesAvailable |
|
staticget |
Indicates whether the glasses are plugged in and functioning.
Definition at line 162 of file Glasses.cs.
◆ 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)
Definition at line 150 of file Glasses.cs.
◆ position
| Vector3 TiltFive.Glasses.position |
|
staticget |
Gets the head pose position.
The position of player 1's glasses (if connected, otherwise a zero vector)
Definition at line 119 of file Glasses.cs.
◆ 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)
Definition at line 137 of file Glasses.cs.
◆ 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)
Definition at line 156 of file Glasses.cs.
◆ rotation
| Quaternion TiltFive.Glasses.rotation |
|
staticget |
Gets the head pose rotation.
The rotation of player 1's glasses (if connected, otherwise the identity quaternion)
Definition at line 125 of file Glasses.cs.
◆ 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)
Definition at line 143 of file Glasses.cs.
◆ 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.
Definition at line 106 of file Glasses.cs.
The documentation for this class was generated from the following file:
- C:/Users/mail1/Documents/t5sw/sdk/unity/unity_package/Runtime/Player/Glasses/Glasses.cs