59 #region Protected Functions
61 protected void Reset(TSettings settings)
72 Log.
Error(
"TrackableSettings configuration required for tracking updates.");
81 var successfullyGotState =
TryGetStateFromPlugin(out var state, out
bool poseIsValid, gameboardSettings);
83 if (successfullyConnected && successfullyGotState && poseIsValid)
102 var pos_UGBD =
new Vector3(pos_GBD.x, pos_GBD.z, pos_GBD.y);
112 (scaleToUWRLD_UGBD * pose_GameboardSpace.position) + gameboardSettings.
gameBoardCenter;
116 return new Pose(pos_UWRLD, rotToUWRLD_OBJ);
134 pos_UGBD = Quaternion.Inverse(rotToUWRLD_UGBD) * pos_UGBD;
135 pos_UGBD /= scaleToUWRLD_UGBD;
143 var rotToUWRLD_OBJ = rotToUWRLD_UGBD * rotToUGBD_OBJ;
145 return rotToUWRLD_OBJ;
151 var rotToUGBD_UWRLD = Quaternion.Inverse(rotToUWRLD_UGBD);
152 var rotToUGBD_OBJ = rotToUGBD_UWRLD * rotToUWRLD_OBJ;
154 return rotToUGBD_OBJ;
158 #endregion Protected Functions
161 #region Abstract Functions
219 #endregion Abstract Functions
Vector3 gameBoardCenter
The game board position or focal position offset.
GameBoard currentGameBoard
The game board is the window into the game world, as well as the origin about which the glasses/wand ...
float gameBoardScale
The game board's scale multiplies the perceived size of objects in the scene.
static void Error(string m, params object[] list)
ERROR logging function call.
ScaleSettings contains the scale data used to translate between Unity units and the user's physical s...
float GetScaleToUWRLD_UGBD(float gameboardScale)
abstract void SetDefaultPoseGameboardSpace(TSettings settings)
Gets the default pose of the tracked object.
bool IsConnected
Whether or not the trackable is connected.
abstract bool TryCheckConnected(out bool connected)
Determines whether the tracked object is still connected.
static Quaternion WorldToGameboardSpace(Quaternion rotToUWRLD_OBJ, GameBoardSettings gameboardSettings)
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 inva...
virtual void Update(TSettings settings, ScaleSettings scaleSettings, GameBoardSettings gameboardSettings)
void Reset(TSettings settings)
Pose gameboardPos_UWRLD
The pose of the gameboard reference frame w.r.t. the Unity world-space reference frame.
abstract void SetDrivenObjectTransform(TSettings settings, ScaleSettings scaleSettings, GameBoardSettings gameboardSettings)
Sets the pose of the object(s) being driven by TrackableCore.
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 SetPoseUnityWorldSpace(ScaleSettings scaleSettings, GameBoardSettings gameboardSettings)
Sets the pose values of the tracked object in Unity World Space
static Quaternion GameboardToWorldSpace(Quaternion rotToUGBD_OBJ, GameBoardSettings gameboardSettings)
static Pose GameboardToWorldSpace(Pose pose_GameboardSpace, ScaleSettings scaleSettings, GameBoardSettings gameboardSettings)
static Vector3 WorldToGameboardSpace(Vector3 pos_UWRLD, ScaleSettings scaleSettings, GameBoardSettings gameboardSettings)
Pose Pose_GameboardSpace
The pose of the trackable w.r.t. the gameboard reference frame.
static Vector3 GameboardToWorldSpace(Vector3 pos_UGBD, ScaleSettings scaleSettings, GameBoardSettings gameboardSettings)
bool IsTracked
Whether or not the trackable is being tracked.
Pose Pose_UnityWorldSpace
The Pose of the trackable in Unity world space.
abstract void SetPoseGameboardSpace(in TState state, TSettings settings, ScaleSettings scaleSettings, GameBoardSettings gameboardSettings)
Sets the pose values of the tracked object in Unity World Space
static Vector3 ConvertPosGBDToUGBD(Vector3 pos_GBD)