The Glasses API and runtime.
More...
|
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.
◆ AREyes
Enumerator |
---|
EYE_LEFT | |
EYE_RIGHT | |
EYE_MAX | |
◆ 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.
◆ 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.
◆ 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.
◆ headPoseUpdated()
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. |
◆ IsConnected()
Indicate if the specified glasses are connected.
- Returns
true
if the glasses are connected, false
otherwise.
- Parameters
-
glassesHandle | Glasses handle to check. |
◆ IsTracked()
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. |
◆ 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. |
◆ 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.
◆ 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.
◆ 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.
◆ 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.
◆ Update()
Updates this T:TiltFive.Glasses.
- Parameters
-
glassesSettings | Glasses settings for the update. |
◆ 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. |
◆ 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: