The Glasses API and runtime. More...
Classes | |
| class | BaseGlassesCore |
| class | GlassesCore |
| Internal Glasses core runtime. More... | |
| class | GlassesPreviewCore |
| Trackable core for the smoothed glasses preview pose. More... | |
Public Types | |
| enum | AREyes { EYE_LEFT = 0 , EYE_RIGHT , EYE_MAX } |
Static Public Member Functions | |
| 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 | IsTracked (PlayerIndex playerIndex=PlayerIndex.One) |
| Indicate if the specified glasses are tracked. | |
| static bool | IsConnected (PlayerIndex playerIndex=PlayerIndex.One) |
| Indicate if the specified glasses are connected. | |
| static bool | TryGetFriendlyName (PlayerIndex playerIndex, out string friendlyName) |
| 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) |
| static Camera | GetLeftEye (PlayerIndex playerIndex) |
| static Camera | GetRightEye (PlayerIndex playerIndex) |
| 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, private set] |
| Indicates whether the glasses are plugged in and functioning. | |
Properties inherited from TiltFive.Singleton< Glasses > | |
| static T | Instance [get] |
Static Private Member Functions | |
| static GameObject | GetPoseRoot (GlassesHandle glassesHandle) |
| static Camera | GetLeftEye (GlassesHandle glassesHandle) |
| static Camera | GetRightEye (GlassesHandle glassesHandle) |
| static GlassesCore | GetPlayerOneGlassesCore () |
| static bool | TryGetSpectatorSettings (out SpectatorSettings spectatorSettings) |
Private Attributes | |
| Dictionary< GlassesHandle, GlassesCore > | glassesCores = new Dictionary<GlassesHandle, GlassesCore>() |
| The glasses core runtimes. | |
| HashSet< GlassesHandle > | incomingHandles = new HashSet<GlassesHandle>() |
| HashSet< GlassesHandle > | lostHandles = new HashSet<GlassesHandle>() |
| GlassesHandle? | defaultGlassesHandle |
| The identifier for the first detected pair of glasses. | |
Additional Inherited Members | |
Protected Member Functions inherited from TiltFive.Singleton< Glasses > | |
| Singleton () | |
The Glasses API and runtime.
Definition at line 34 of file Glasses.cs.
| Enumerator | |
|---|---|
| EYE_LEFT | |
| EYE_RIGHT | |
| EYE_MAX | |
Definition at line 56 of file Glasses.cs.
|
staticprivate |
Definition at line 523 of file Glasses.cs.
|
static |
Definition at line 305 of file Glasses.cs.
References TiltFive.Glasses.GetLeftEye().
Referenced by TiltFive.TiltFiveManager.GetEyeCamera(), TiltFive.TiltFiveManager2.GetEyeCamera(), and TiltFive.Glasses.GetLeftEye().
|
staticprivate |
Definition at line 542 of file Glasses.cs.
|
staticprivate |
Definition at line 514 of file Glasses.cs.
|
static |
Definition at line 296 of file Glasses.cs.
References TiltFive.Glasses.GetPoseRoot().
Referenced by TiltFive.Glasses.GetPoseRoot().
|
staticprivate |
Definition at line 532 of file Glasses.cs.
|
static |
Definition at line 314 of file Glasses.cs.
References TiltFive.Glasses.GetRightEye().
Referenced by TiltFive.Glasses.GetRightEye().
|
static |
Returns a boolean indication that the head pose was successfully updated.
true, if the head pose was updated, false otherwise.| glassesHandle | The specified glasses. If null is provided, this uses the default glasses. |
Definition at line 133 of file Glasses.cs.
References TiltFive.Singleton< Glasses >.Instance.
|
static |
Indicate if the specified glasses are connected.
true if the glasses are connected, false otherwise.| glassesHandle | Glasses handle to check. |
Definition at line 231 of file Glasses.cs.
References TiltFive.Glasses.IsConnected().
Referenced by TiltFive.Glasses.IsConnected().
|
static |
Indicate if the specified glasses are tracked.
true if the glasses are tracked, false otherwise.| playerIndex | If not provided, the Player 1's glasses are checked. |
Definition at line 220 of file Glasses.cs.
References TiltFive.Glasses.IsTracked().
Referenced by TiltFive.Glasses.IsTracked(), and TiltFive.Wand.WandCore.TryGetStateFromPlugin().
|
static |
Reset this T:TiltFive.Glasses.
| glassesSettings | Glasses settings for configuring the specified glassesCore. |
| playerIndex | The specified player. If None is provided, this resets all glasses. |
Definition at line 149 of file Glasses.cs.
References TiltFive.Logging.Log.Error(), TiltFive.Singleton< Glasses >.Instance, TiltFive.Glasses.Reset(), and TiltFive.Glasses.TryGetSpectatorSettings().
Referenced by TiltFive.TiltFiveManager.OnEnable(), and TiltFive.Glasses.Reset().
|
static |
Definition at line 323 of file Glasses.cs.
References TiltFive.NativePlugin.GetGlassesHandles(), and TiltFive.NativePlugin.RefreshGlassesAvailable().
|
static |
Definition at line 250 of file Glasses.cs.
References TiltFive.Glasses.TryGetFriendlyName().
Referenced by TiltFive.Glasses.TryGetFriendlyName(), and TiltFive.Wand.WandCore.WandCore().
|
static |
Attempts to get the position and orientation of the specified player's glasses.
| playerIndex | |
| pose |
Definition at line 267 of file Glasses.cs.
References TiltFive.Singleton< Glasses >.Instance.
|
static |
Attempts to get the position and orientation of the specified player's glasses, smoothed for on-screen preview.
| playerIndex | |
| pose |
Definition at line 285 of file Glasses.cs.
References TiltFive.Singleton< Glasses >.Instance.
Referenced by TiltFive.TiltFiveManager.Update(), and TiltFive.TiltFiveManager2.Update().
|
staticprivate |
Definition at line 552 of file Glasses.cs.
References TiltFive.TiltFiveSingletonHelper.TryGetISceneInfo().
Referenced by TiltFive.Glasses.Reset(), TiltFive.Glasses.Update(), and TiltFive.Glasses.Validate().
|
static |
Updates this T:TiltFive.Glasses.
| glassesSettings | Glasses settings for the update. |
Definition at line 201 of file Glasses.cs.
References TiltFive.Singleton< Glasses >.Instance, and TiltFive.Glasses.TryGetSpectatorSettings().
Referenced by TiltFive.TiltFiveManager.GetLatestPoseData(), and TiltFive.Player.PlayerCore.GetLatestPoseData().
|
static |
Validates the specified glassesSettings with the specified glasses core.
true, if the glasses core is valid with the given settings, false otherwise. | glassesSettings | Glasses settings. |
| playerIndex | The specified glasses to validate. If None is provided, this uses the default glasses. |
Definition at line 182 of file Glasses.cs.
References TiltFive.Glasses.TryGetSpectatorSettings(), and TiltFive.Glasses.Validate().
Referenced by TiltFive.Glasses.Validate().
|
private |
The identifier for the first detected pair of glasses.
Definition at line 49 of file Glasses.cs.
|
private |
The glasses core runtimes.
Definition at line 41 of file Glasses.cs.
|
private |
Definition at line 43 of file Glasses.cs.
|
private |
Definition at line 44 of file Glasses.cs.
|
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 79 of file Glasses.cs.
|
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 94 of file Glasses.cs.
|
staticgetprivate set |
Indicates whether the glasses are plugged in and functioning.
Definition at line 120 of file Glasses.cs.
|
staticget |
Gets the left eye position.
The left eye position of player 1's glasses (if connected, otherwise the zero vector)
Definition at line 110 of file Glasses.cs.
|
staticget |
Gets the head pose position.
The position of player 1's glasses (if connected, otherwise a zero vector)
Definition at line 84 of file Glasses.cs.
|
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 99 of file Glasses.cs.
|
staticget |
Gets the right eye position.
The right eye position of player 1's glasses (if connected, otherwise the zero vector)
Definition at line 115 of file Glasses.cs.
|
staticget |
Gets the head pose rotation.
The rotation of player 1's glasses (if connected, otherwise the identity quaternion)
Definition at line 89 of file Glasses.cs.
|
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 104 of file Glasses.cs.
|
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 73 of file Glasses.cs.
Referenced by TiltFive.SplitStereoCamera.SyncTransform().