Internal Wand core runtime. More...
Public Member Functions | |
| WandCore (GlassesHandle glassesHandle, ControllerIndex controllerIndex) | |
| virtual void | GetLatestInputs () |
| bool | GetButton (WandButton button) |
| bool | TryGetButton (WandButton button, out bool pressed) |
| bool | GetButtonDown (WandButton button) |
| bool | TryGetButtonDown (WandButton button, out bool buttonDown) |
| bool | GetButtonUp (WandButton button) |
| bool | TryGetButtonUp (WandButton button, out bool buttonUp) |
| Vector2 | GetStickTilt () |
| bool | TryGetStickTilt (out Vector2 stickTilt) |
| float | GetTrigger () |
| bool | TryGetTrigger (out float triggerDisplacement) |
| new void | Reset (WandSettings wandSettings) |
| virtual new void | Update (WandSettings wandSettings, ScaleSettings scaleSettings, GameBoardSettings gameBoardSettings) |
| virtual void | Dispose () |
Public Attributes | |
| readonly GlassesHandle | glassesHandle |
| readonly ControllerIndex | controllerIndex |
| Pose | fingertipsPose_GameboardSpace = new Pose(DEFAULT_WAND_POSITION_GAME_BOARD_SPACE, Quaternion.identity) |
| Pose | aimPose_GameboardSpace = new Pose(DEFAULT_WAND_POSITION_GAME_BOARD_SPACE, Quaternion.identity) |
| Pose | fingertipsPose_UnityWorldSpace |
| Pose | aimPose_UnityWorldSpace |
Protected Member Functions | |
| override void | SetDefaultPoseGameboardSpace (WandSettings settings) |
| override void | SetPoseUnityWorldSpace (ScaleSettings scaleSettings, GameBoardSettings gameBoardSettings) |
| Sets the pose values of the tracked object in Unity World Space. | |
| override bool | TryCheckConnected (out bool connected) |
| Determines whether the tracked object is still connected. | |
| override bool | TryGetStateFromPlugin (out T5_ControllerState controllerState, out bool poseIsValid, GameBoardSettings gameBoardSettings) |
| override void | SetPoseGameboardSpace (in T5_ControllerState controllerState, WandSettings wandSettings, ScaleSettings scaleSettings, GameBoardSettings gameboardSettings) |
| override void | SetInvalidPoseGameboardSpace (in T5_ControllerState t5_ControllerState, WandSettings settings, ScaleSettings scaleSettings, GameBoardSettings gameboardSettings) |
| Handle setting the wand pose when we know the controller state isn't valid. | |
| override void | SetDrivenObjectTransform (WandSettings wandSettings, ScaleSettings scaleSettings, GameBoardSettings gameBoardSettings) |
| Quaternion | CalculateRotation (Quaternion rotToWND_GBD) |
| void | ProcessTrackingData (Vector3 gripPosition_UGBD, Vector3 fingertipsPosition_UGBD, Vector3 aimPosition_UGBD, Quaternion rotToUGBD_WND, WandSettings wandSettings, ScaleSettings scaleSettings, GameBoardSettings gameBoardSettings, out Pose gripPose_UGBD, out Pose fingertipsPose_UGBD, out Pose aimPose_UGBD) |
| Pose | FilterTrackingPointPose (Pose staleGripPointPose, Pose staleTrackingPointPose, Pose newTrackingPointPose, float trackingPointOffsetDistance, WandSettings settings) |
Protected Member Functions inherited from TiltFive.TrackableCore< WandSettings, T5_ControllerState > | |
| void | Reset (TSettings settings) |
| virtual void | Update (TSettings settings, ScaleSettings scaleSettings, GameBoardSettings gameboardSettings) |
| abstract void | SetDefaultPoseGameboardSpace (TSettings settings) |
| Gets the default pose of the tracked object. | |
| abstract void | SetPoseGameboardSpace (in TState state, TSettings settings, ScaleSettings scaleSettings, GameBoardSettings gameboardSettings) |
| Sets the pose values of the tracked object in Unity World Space. | |
| abstract void | SetInvalidPoseGameboardSpace (in TState state, TSettings settings, ScaleSettings scaleSettings, GameBoardSettings gameboardSettings) |
| Sets the pose values of the tracked object in Unity World Space when we already know the pose is invalid. | |
| abstract void | SetPoseUnityWorldSpace (ScaleSettings scaleSettings, GameBoardSettings gameboardSettings) |
| Sets the pose values of the tracked object in Unity World Space. | |
| abstract bool | TryCheckConnected (out bool connected) |
| Determines whether the tracked object is still connected. | |
| abstract bool | TryGetStateFromPlugin (out TState state, out bool poseIsValid, GameBoardSettings gameboardSettings) |
| Gets the latest pose for the tracked object from the native plugin. | |
| abstract void | SetDrivenObjectTransform (TSettings settings, ScaleSettings scaleSettings, GameBoardSettings gameboardSettings) |
| Sets the pose of the object(s) being driven by TrackableCore. | |
Static Protected Member Functions | |
| static Pose | GetDefaultPoseGameboardSpace (WandSettings settings) |
Static Protected Member Functions inherited from TiltFive.TrackableCore< WandSettings, T5_ControllerState > | |
| static Vector3 | ConvertPosGBDToUGBD (Vector3 pos_GBD) |
| static Pose | GameboardToWorldSpace (Pose pose_GameboardSpace, ScaleSettings scaleSettings, GameBoardSettings gameboardSettings) |
| static Vector3 | GameboardToWorldSpace (Vector3 pos_UGBD, ScaleSettings scaleSettings, GameBoardSettings gameboardSettings) |
| static Quaternion | GameboardToWorldSpace (Quaternion rotToUGBD_OBJ, GameBoardSettings gameboardSettings) |
| static Vector3 | WorldToGameboardSpace (Vector3 pos_UWRLD, ScaleSettings scaleSettings, GameBoardSettings gameboardSettings) |
| static Quaternion | WorldToGameboardSpace (Quaternion rotToUWRLD_OBJ, GameBoardSettings gameboardSettings) |
Protected Attributes | |
| T5_ControllerState? | currentState |
| T5_ControllerState? | previousState |
Protected Attributes inherited from TiltFive.TrackableCore< WandSettings, T5_ControllerState > | |
| Pose | pose_UGBD |
| Pose | pose_UWRLD |
| bool | isTracked |
| bool | isConnected |
| Pose | gameboardPos_UWRLD |
| The pose of the gameboard reference frame w.r.t. the Unity world-space reference frame. | |
Properties | |
| Pose | gripPose_UnityWorldSpace [get] |
Properties inherited from TiltFive.TrackableCore< WandSettings, T5_ControllerState > | |
| Pose | Pose_GameboardSpace [get] |
| The pose of the trackable w.r.t. the gameboard reference frame. | |
| Pose | Pose_UnityWorldSpace [get] |
| The Pose of the trackable in Unity world space. | |
| bool | IsTracked [get] |
| Whether or not the trackable is being tracked. | |
| bool | IsConnected [get] |
| Whether or not the trackable is connected. | |
| TiltFive.Wand.WandCore.WandCore | ( | GlassesHandle | glassesHandle, |
| ControllerIndex | controllerIndex | ||
| ) |
Definition at line 662 of file Wand.cs.
References TiltFive.Wand.WandCore.controllerIndex, TiltFive.Wand.WandCore.glassesHandle, TiltFive.Logging.Log.Info(), and TiltFive.Glasses.TryGetFriendlyName().
|
protected |
Definition at line 944 of file Wand.cs.
Referenced by TiltFive.Wand.WandCore.SetPoseGameboardSpace().
|
virtual |
Definition at line 934 of file Wand.cs.
References TiltFive.Logging.Log.Info().
|
protected |
Definition at line 985 of file Wand.cs.
References TiltFive.TrackableSettings.FailureMode, TiltFive.Wand.WandCore.GetDefaultPoseGameboardSpace(), TiltFive.TrackableCore< WandSettings, T5_ControllerState >.isTracked, and TiltFive.TrackableSettings.RejectUntrackedPositionData.
Referenced by TiltFive.Wand.WandCore.ProcessTrackingData().
| bool TiltFive.Wand.WandCore.GetButton | ( | WandButton | button | ) |
Definition at line 692 of file Wand.cs.
References TiltFive.Wand.WandCore.currentState.
| bool TiltFive.Wand.WandCore.GetButtonDown | ( | WandButton | button | ) |
Definition at line 706 of file Wand.cs.
References TiltFive.Wand.WandCore.currentState, and TiltFive.Wand.WandCore.previousState.
Referenced by TiltFive.Wand.WandCore.TryGetButtonDown().
| bool TiltFive.Wand.WandCore.GetButtonUp | ( | WandButton | button | ) |
Definition at line 733 of file Wand.cs.
References TiltFive.Wand.WandCore.currentState, and TiltFive.Wand.WandCore.previousState.
Referenced by TiltFive.Wand.WandCore.TryGetButtonUp().
|
staticprotected |
Definition at line 810 of file Wand.cs.
References TiltFive.Wand.DEFAULT_WAND_HANDEDNESS_OFFSET_GAME_BOARD_SPACE, TiltFive.Wand.DEFAULT_WAND_POSITION_GAME_BOARD_SPACE, and TiltFive.Wand.DEFAULT_WAND_ROTATION_GAME_BOARD_SPACE.
Referenced by TiltFive.Wand.WandCore.FilterTrackingPointPose(), and TiltFive.Wand.WandCore.SetDefaultPoseGameboardSpace().
|
virtual |
Definition at line 671 of file Wand.cs.
References TiltFive.Wand.WandCore.controllerIndex, TiltFive.Wand.WandCore.currentState, TiltFive.Logging.Log.Error(), TiltFive.NativePlugin.GetControllerState(), TiltFive.Wand.WandCore.glassesHandle, and TiltFive.Wand.WandCore.previousState.
| Vector2 TiltFive.Wand.WandCore.GetStickTilt | ( | ) |
Definition at line 759 of file Wand.cs.
References TiltFive.Wand.WandCore.currentState, and TiltFive.T5_ControllerState.Stick.
Referenced by TiltFive.Wand.WandCore.TryGetStickTilt().
| float TiltFive.Wand.WandCore.GetTrigger | ( | ) |
Definition at line 770 of file Wand.cs.
References TiltFive.Wand.WandCore.currentState, and TiltFive.T5_ControllerState.Trigger.
Referenced by TiltFive.Wand.WandCore.TryGetTrigger().
|
protected |
Definition at line 953 of file Wand.cs.
References TiltFive.Wand.WandCore.aimPose_GameboardSpace, TiltFive.Wand.WandCore.FilterTrackingPointPose(), TiltFive.Wand.WandCore.fingertipsPose_GameboardSpace, and TiltFive.TrackableCore< WandSettings, T5_ControllerState >.pose_UGBD.
Referenced by TiltFive.Wand.WandCore.SetPoseGameboardSpace().
| new void TiltFive.Wand.WandCore.Reset | ( | WandSettings | wandSettings | ) |
|
protected |
Definition at line 802 of file Wand.cs.
References TiltFive.Wand.WandCore.aimPose_GameboardSpace, TiltFive.Wand.WandCore.fingertipsPose_GameboardSpace, TiltFive.Wand.WandCore.GetDefaultPoseGameboardSpace(), and TiltFive.TrackableCore< WandSettings, T5_ControllerState >.pose_UGBD.
|
protected |
Definition at line 916 of file Wand.cs.
References TiltFive.WandSettings.AimPoint, TiltFive.Wand.WandCore.aimPose_UnityWorldSpace, TiltFive.WandSettings.FingertipPoint, TiltFive.Wand.WandCore.fingertipsPose_UnityWorldSpace, TiltFive.WandSettings.GripPoint, and TiltFive.Wand.WandCore.gripPose_UnityWorldSpace.
|
protected |
Handle setting the wand pose when we know the controller state isn't valid.
| t5_ControllerState | The invalid state. It can still be useful if we want to use its rotation values. |
| settings | |
| scaleSettings | |
| gameboardSettings |
Definition at line 911 of file Wand.cs.
References TiltFive.Wand.WandCore.SetPoseGameboardSpace().
|
protected |
Definition at line 877 of file Wand.cs.
References TiltFive.Wand.WandCore.aimPose_GameboardSpace, TiltFive.Wand.WandCore.CalculateRotation(), TiltFive.TrackableCore< WandSettings, T5_ControllerState >.ConvertPosGBDToUGBD(), TiltFive.Wand.WandCore.fingertipsPose_GameboardSpace, TiltFive.TrackableCore< WandSettings, T5_ControllerState >.pose_UGBD, and TiltFive.Wand.WandCore.ProcessTrackingData().
Referenced by TiltFive.Wand.WandCore.SetInvalidPoseGameboardSpace().
|
protectedvirtual |
Sets the pose values of the tracked object in Unity World Space.
| scaleSettings | |
| gameboardSettings |
Implements TiltFive.TrackableCore< WandSettings, T5_ControllerState >.
Definition at line 819 of file Wand.cs.
References TiltFive.Wand.WandCore.aimPose_GameboardSpace, TiltFive.Wand.WandCore.aimPose_UnityWorldSpace, TiltFive.Wand.WandCore.fingertipsPose_GameboardSpace, TiltFive.Wand.WandCore.fingertipsPose_UnityWorldSpace, TiltFive.TrackableCore< WandSettings, T5_ControllerState >.GameboardToWorldSpace(), TiltFive.TrackableCore< WandSettings, T5_ControllerState >.pose_UGBD, and TiltFive.TrackableCore< WandSettings, T5_ControllerState >.pose_UWRLD.
|
protectedvirtual |
Determines whether the tracked object is still connected.
| connected |
Implements TiltFive.TrackableCore< WandSettings, T5_ControllerState >.
Definition at line 826 of file Wand.cs.
References TiltFive.Wand.WandCore.controllerIndex, TiltFive.Logging.Log.Error(), TiltFive.NativePlugin.GetWandAvailability(), TiltFive.Wand.WandCore.glassesHandle, TiltFive.Logging.Log.Info(), TiltFive.TrackableCore< WandSettings, T5_ControllerState >.isConnected, and TiltFive.Wand.wandAvailabilityErroredOnce.
| bool TiltFive.Wand.WandCore.TryGetButton | ( | WandButton | button, |
| out bool | pressed | ||
| ) |
Definition at line 698 of file Wand.cs.
References TiltFive.Wand.WandCore.currentState.
| bool TiltFive.Wand.WandCore.TryGetButtonDown | ( | WandButton | button, |
| out bool | buttonDown | ||
| ) |
Definition at line 726 of file Wand.cs.
References TiltFive.Wand.WandCore.currentState, and TiltFive.Wand.WandCore.GetButtonDown().
| bool TiltFive.Wand.WandCore.TryGetButtonUp | ( | WandButton | button, |
| out bool | buttonUp | ||
| ) |
Definition at line 752 of file Wand.cs.
References TiltFive.Wand.WandCore.currentState, and TiltFive.Wand.WandCore.GetButtonUp().
|
protected |
Definition at line 861 of file Wand.cs.
References TiltFive.Wand.WandCore.controllerIndex, TiltFive.Wand.WandCore.glassesHandle, and TiltFive.Glasses.IsTracked().
| bool TiltFive.Wand.WandCore.TryGetStickTilt | ( | out Vector2 | stickTilt | ) |
Definition at line 764 of file Wand.cs.
References TiltFive.Wand.WandCore.currentState, and TiltFive.Wand.WandCore.GetStickTilt().
| bool TiltFive.Wand.WandCore.TryGetTrigger | ( | out float | triggerDisplacement | ) |
Definition at line 775 of file Wand.cs.
References TiltFive.Wand.WandCore.currentState, and TiltFive.Wand.WandCore.GetTrigger().
|
virtual |
Definition at line 791 of file Wand.cs.
References TiltFive.Logging.Log.Error().
| Pose TiltFive.Wand.WandCore.aimPose_GameboardSpace = new Pose(DEFAULT_WAND_POSITION_GAME_BOARD_SPACE, Quaternion.identity) |
Definition at line 648 of file Wand.cs.
Referenced by TiltFive.Wand.WandCore.ProcessTrackingData(), TiltFive.Wand.WandCore.SetDefaultPoseGameboardSpace(), TiltFive.Wand.WandCore.SetPoseGameboardSpace(), and TiltFive.Wand.WandCore.SetPoseUnityWorldSpace().
| Pose TiltFive.Wand.WandCore.aimPose_UnityWorldSpace |
Definition at line 652 of file Wand.cs.
Referenced by TiltFive.Wand.WandCore.SetDrivenObjectTransform(), and TiltFive.Wand.WandCore.SetPoseUnityWorldSpace().
| readonly ControllerIndex TiltFive.Wand.WandCore.controllerIndex |
Definition at line 645 of file Wand.cs.
Referenced by TiltFive.Wand.WandCore.GetLatestInputs(), TiltFive.Wand.WandCore.TryCheckConnected(), TiltFive.Wand.WandCore.TryGetStateFromPlugin(), and TiltFive.Wand.WandCore.WandCore().
|
protected |
Definition at line 654 of file Wand.cs.
Referenced by TiltFive.Wand.WandCore.GetButton(), TiltFive.Wand.WandCore.GetButtonDown(), TiltFive.Wand.WandCore.GetButtonUp(), TiltFive.Wand.WandCore.GetLatestInputs(), TiltFive.Wand.WandCore.GetStickTilt(), TiltFive.Wand.WandCore.GetTrigger(), TiltFive.Wand.WandCore.TryGetButton(), TiltFive.Wand.WandCore.TryGetButtonDown(), TiltFive.Wand.WandCore.TryGetButtonUp(), TiltFive.Wand.WandCore.TryGetStickTilt(), and TiltFive.Wand.WandCore.TryGetTrigger().
| Pose TiltFive.Wand.WandCore.fingertipsPose_GameboardSpace = new Pose(DEFAULT_WAND_POSITION_GAME_BOARD_SPACE, Quaternion.identity) |
Definition at line 647 of file Wand.cs.
Referenced by TiltFive.Wand.WandCore.ProcessTrackingData(), TiltFive.Wand.WandCore.SetDefaultPoseGameboardSpace(), TiltFive.Wand.WandCore.SetPoseGameboardSpace(), and TiltFive.Wand.WandCore.SetPoseUnityWorldSpace().
| Pose TiltFive.Wand.WandCore.fingertipsPose_UnityWorldSpace |
Definition at line 651 of file Wand.cs.
Referenced by TiltFive.Wand.WandCore.SetDrivenObjectTransform(), and TiltFive.Wand.WandCore.SetPoseUnityWorldSpace().
| readonly GlassesHandle TiltFive.Wand.WandCore.glassesHandle |
Definition at line 644 of file Wand.cs.
Referenced by TiltFive.Wand.WandCore.GetLatestInputs(), TiltFive.Wand.WandCore.TryCheckConnected(), TiltFive.Wand.WandCore.TryGetStateFromPlugin(), and TiltFive.Wand.WandCore.WandCore().
|
protected |
Definition at line 655 of file Wand.cs.
Referenced by TiltFive.Wand.WandCore.GetButtonDown(), TiltFive.Wand.WandCore.GetButtonUp(), and TiltFive.Wand.WandCore.GetLatestInputs().
|
get |
Definition at line 650 of file Wand.cs.
Referenced by TiltFive.Wand.WandCore.SetDrivenObjectTransform().