Tilt Five Unity API
1.3.0
|
The Wand API and runtime. More...
Classes | |
class | WandCore |
Internal Wand core runtime. More... | |
struct | WandPair |
Static Public Member Functions | |
static void | Update (WandSettings wandSettings, ScaleSettings scaleSettings, GameBoardSettings gameBoardSettings, PlayerIndex playerIndex=PlayerIndex.One) |
static void | ScanForWands () |
static Vector3 | GetPosition (ControllerIndex controllerIndex=ControllerIndex.Right, ControllerPosition controllerPosition=ControllerPosition.Grip, PlayerIndex playerIndex=PlayerIndex.One) |
Gets the position of the wand in world space. More... | |
static Quaternion | GetRotation (ControllerIndex controllerIndex=ControllerIndex.Right, PlayerIndex playerIndex=PlayerIndex.One) |
Gets the rotation of the wand in world space. More... | |
static bool | IsTracked (ControllerIndex controllerIndex=ControllerIndex.Right, PlayerIndex playerIndex=PlayerIndex.One) |
static bool | TryCheckConnected (out bool connected, PlayerIndex playerIndex, ControllerIndex controllerIndex=ControllerIndex.Right) |
Gets the connection status of the indicated wand. More... | |
Private Member Functions | |
WandCore | ObtainWandCore (GlassesHandle glassesHandle, ControllerIndex controllerIndex) |
Static Private Member Functions | |
static bool | TryScanForWands () |
static bool | TryGetWandAvailability (out bool connected, GlassesHandle glassesHandle, ControllerIndex controllerIndex) |
Private Attributes | |
Dictionary< GlassesHandle, WandPair > | wandCores = new Dictionary<GlassesHandle, WandPair>() |
The collection of WandCores. GlassesHandles are mapped to pairs of right/left WandCores. More... | |
HashSet< GlassesHandle > | incomingHandles = new HashSet<GlassesHandle>() |
HashSet< GlassesHandle > | lostHandles = new HashSet<GlassesHandle>() |
HashSet< WandCore > | lostWands = new HashSet<WandCore>() |
Static Private Attributes | |
static readonly Vector3 | DEFAULT_WAND_POSITION_GAME_BOARD_SPACE = new Vector3(0f, 0.25f, -0.25f) |
The default position of the wand relative to the board. More... | |
static readonly Vector3 | DEFAULT_WAND_HANDEDNESS_OFFSET_GAME_BOARD_SPACE = new Vector3(0.125f, 0f, 0f) |
A left/right offset to the default wand position, depending on handedness. More... | |
static readonly Quaternion | DEFAULT_WAND_ROTATION_GAME_BOARD_SPACE = Quaternion.Euler(new Vector3(-33f, 0f, 0f)) |
The default rotation of the wand relative to the board. More... | |
static DateTime | lastScanAttempt = System.DateTime.MinValue |
static readonly double | wandScanRate = 0.5d |
static bool | wandAvailabilityErroredOnce = false |
static int | currentFrame = -1 |
Additional Inherited Members | |
![]() | |
Singleton () | |
![]() | |
static T | Instance [get] |
|
static |
Gets the position of the wand in world space.
controllerIndex | |
controllerPosition | |
glassesHandle | The specified glasses. If null is provided, this uses the default glasses. |
Definition at line 303 of file Wand.cs.
References TiltFive.Singleton< Wand >.Instance.
|
static |
Gets the rotation of the wand in world space.
controllerIndex | |
glassesHandle | The specified glasses. If null is provided, this uses the default glasses. |
Definition at line 334 of file Wand.cs.
References TiltFive.Singleton< Wand >.Instance.
|
static |
|
private |
Definition at line 603 of file Wand.cs.
References TiltFive.Wand.lostWands, TiltFive.Wand.TryGetWandAvailability(), and TiltFive.Wand.wandCores.
|
static |
Definition at line 203 of file Wand.cs.
References TiltFive.Wand.incomingHandles, TiltFive.Singleton< Wand >.Instance, TiltFive.Wand.lostHandles, TiltFive.Wand.lostWands, TiltFive.Wand.TryGetWandAvailability(), TiltFive.Wand.TryScanForWands(), and TiltFive.Wand.wandCores.
Referenced by TiltFive.Input.Input().
|
static |
Gets the connection status of the indicated wand.
connected | |
playerIndex | |
controllerIndex |
Definition at line 365 of file Wand.cs.
References TiltFive.Singleton< Wand >.Instance.
Referenced by TiltFive.Input.GetWandAvailability().
|
staticprivate |
Definition at line 394 of file Wand.cs.
References TiltFive.Logging.Log.Error(), TiltFive.NativePlugin.GetWandAvailability(), TiltFive.Logging.Log.Info(), and TiltFive.Wand.wandAvailabilityErroredOnce.
Referenced by TiltFive.Wand.ObtainWandCore(), and TiltFive.Wand.ScanForWands().
|
staticprivate |
Definition at line 169 of file Wand.cs.
References TiltFive.Logging.Log.Error(), TiltFive.Input.GetWandAvailability(), TiltFive.Logging.Log.Info(), TiltFive.Wand.lastScanAttempt, TiltFive.NativePlugin.ScanForWands(), and TiltFive.Wand.wandScanRate.
Referenced by TiltFive.Wand.ScanForWands().
|
static |
Definition at line 151 of file Wand.cs.
Referenced by TiltFive.TiltFiveManager.GetLatestPoseData(), and TiltFive.Player.PlayerCore.GetLatestPoseData().
|
staticprivate |
A left/right offset to the default wand position, depending on handedness.
Definition at line 73 of file Wand.cs.
Referenced by TiltFive.Wand.WandCore.GetDefaultPoseGameboardSpace().
|
staticprivate |
The default position of the wand relative to the board.
The wand GameObject will snap back to this position if the glasses and/or wand are unavailable.
Definition at line 69 of file Wand.cs.
Referenced by TiltFive.Wand.WandCore.GetDefaultPoseGameboardSpace().
|
staticprivate |
The default rotation of the wand relative to the board.
The wand GameObject will snap back to this rotation if the glasses are unavailable. If different behavior is desired in this scenario, a different camera should be used.
Definition at line 82 of file Wand.cs.
Referenced by TiltFive.Wand.WandCore.GetDefaultPoseGameboardSpace().
|
private |
Definition at line 86 of file Wand.cs.
Referenced by TiltFive.Wand.ScanForWands().
|
staticprivate |
Definition at line 94 of file Wand.cs.
Referenced by TiltFive.Wand.TryScanForWands().
|
private |
Definition at line 88 of file Wand.cs.
Referenced by TiltFive.Wand.ScanForWands().
Definition at line 90 of file Wand.cs.
Referenced by TiltFive.Wand.ObtainWandCore(), and TiltFive.Wand.ScanForWands().
|
staticprivate |
Definition at line 99 of file Wand.cs.
Referenced by TiltFive.Wand.WandCore.TryCheckConnected(), and TiltFive.Wand.TryGetWandAvailability().
|
private |
The collection of WandCores. GlassesHandles are mapped to pairs of right/left WandCores.
Definition at line 61 of file Wand.cs.
Referenced by TiltFive.Wand.ObtainWandCore(), and TiltFive.Wand.ScanForWands().
|
staticprivate |
Definition at line 97 of file Wand.cs.
Referenced by TiltFive.Wand.TryScanForWands().