Represents the game board. More...
Classes | |
struct | GameboardDimensions |
struct | GameboardExtents |
Represents the distances from the gameboard tracking origin to the borders of the gameboard's viewable area. More... | |
Public Types | |
enum class | Edge { Near , Far , Left , Right } |
Represents cardinal positions around the gameboard (i.e. the centers of the edges of the gameboard), relative to a user positioned at the near (default) edge. More... | |
enum class | Corner { FarLeft , FarRight , NearLeft , NearRight } |
Represents ordinal positions around the gameboard, relative to a user positioned at the near (default) edge. More... | |
Public Member Functions | |
bool | TransformPose (Vector3 positionInGameboardSpace, Quaternion rotationToGameboardSpace, PlayerIndex playerIndex, out Vector3 positionInWorldSpace, out Quaternion rotationToWorldSpace) |
Transforms the provided pose from gameboard space to world space. More... | |
bool | TransformPose (Pose poseInGameboardSpace, PlayerIndex playerIndex, out Pose poseInWorldSpace) |
Transforms the provided pose from gameboard space to world space. More... | |
bool | TransformPoint (Vector3 pointInGameboardSpace, PlayerIndex playerIndex, out Vector3 pointInWorldSpace) |
Transforms the provided position from gameboard space to world space. More... | |
bool | InverseTransformPose (Vector3 positionInWorldSpace, Quaternion rotationToWorldSpace, PlayerIndex playerIndex, out Vector3 positionInGameboardSpace, out Quaternion rotationToGameboardSpace) |
Transforms the provided pose from world space to gameboard space. More... | |
bool | InverseTransformPose (Pose poseInWorldSpace, PlayerIndex playerIndex, out Pose poseInGameboardSpace) |
Transforms the provided pose from world space to gameboard space. More... | |
bool | InverseTransformPoint (Vector3 pointInWorldSpace, PlayerIndex playerIndex, out Vector3 pointInGameboardSpace) |
Transforms the provided position from world space to gameboard space. More... | |
Public Member Functions inherited from TiltFive.UniformScaleTransform | |
void | Awake () |
Static Public Member Functions | |
static bool | TryGetGameboardType (out GameboardType gameboardType) |
Attempts to check the latest glasses pose for the current gameboard type, such as LE, XE, or none. More... | |
static bool | TryGetGameboardType (PlayerIndex playerIndex, out GameboardType gameboardType) |
static bool | TryGetGameboardDimensions (GameboardType gameboardType, out GameboardDimensions gameboardDimensions) |
Attempts to obtain the physical dimensions for a particular gameboard type. More... | |
static bool | TryGetGameboardExtents (GameboardType gameboardType, out GameboardExtents gameboardExtents) |
Attempts to obtain the physical dimensions for a particular gameboard type. More... | |
Public Attributes | |
bool | ShowGizmo |
Shows the game board gizmo in the editor. More... | |
bool | ShowGrid |
float | GridHeightOffset = 0f |
bool | StickyHeightOffset = true |
float | GizmoOpacity = 0.75f |
Sets the opacity of the game board gizmo in the editor. More... | |
GameboardType | GameboardType |
The gameboard configuration, such as LE, XE, or folded XE. More... | |
Static Private Attributes | |
static Dictionary< PlayerIndex, GameboardType > | playerGameboards = new Dictionary<PlayerIndex, GameboardType>() |
Additional Inherited Members | |
Protected Member Functions inherited from TiltFive.UniformScaleTransform | |
void | UnifyScale () |
Synchronizes the component values of the game object's local scale vector (e.g. [1,2,3] becomes [3,3,3]). More... | |
Properties inherited from TiltFive.UniformScaleTransform | |
float | localScale [get, set] |
The size of the object as a single float value, rather than a scale vector. More... | |
Vector3 | position [get, set] |
The position vector for the associated transform. More... | |
Quaternion | rotation [get, set] |
The rotation vector for the associated transform. More... | |
Represents the game board.
Definition at line 28 of file GameBoard.cs.
|
strong |
Represents ordinal positions around the gameboard, relative to a user positioned at the near (default) edge.
Enumerator | |
---|---|
FarLeft | |
FarRight | |
NearLeft | |
NearRight |
Definition at line 135 of file GameBoard.cs.
|
strong |
Represents cardinal positions around the gameboard (i.e. the centers of the edges of the gameboard), relative to a user positioned at the near (default) edge.
Definition at line 106 of file GameBoard.cs.
bool TiltFive.GameBoard.InverseTransformPoint | ( | Vector3 | pointInWorldSpace, |
PlayerIndex | playerIndex, | ||
out Vector3 | pointInGameboardSpace | ||
) |
Transforms the provided position from world space to gameboard space.
pointInWorldSpace | A position in Unity world space. |
playerIndex | The player whose content scale settings should be considered while converting between spaces. This is necessary because multiple players with differing scale settings may share the same gameboard. |
pointInGameboardSpace | The resulting point in gameboard space. |
Definition at line 532 of file GameBoard.cs.
References TiltFive.Player.TryGetSettings().
bool TiltFive.GameBoard.InverseTransformPose | ( | Pose | poseInWorldSpace, |
PlayerIndex | playerIndex, | ||
out Pose | poseInGameboardSpace | ||
) |
Transforms the provided pose from world space to gameboard space.
poseInWorldSpace | A position and orientation in Unity world space. |
playerIndex | The player whose content scale settings should be considered while converting between spaces. This is necessary because multiple players with differing scale settings may share the same gameboard. |
poseInGameboardSpace | The resulting position and orientation in gameboard space. |
Definition at line 510 of file GameBoard.cs.
References TiltFive.GameBoard.InverseTransformPose(), and TiltFive.Player.TryGetSettings().
bool TiltFive.GameBoard.InverseTransformPose | ( | Vector3 | positionInWorldSpace, |
Quaternion | rotationToWorldSpace, | ||
PlayerIndex | playerIndex, | ||
out Vector3 | positionInGameboardSpace, | ||
out Quaternion | rotationToGameboardSpace | ||
) |
Transforms the provided pose from world space to gameboard space.
positionInWorldSpace | A position in Unity world space. |
rotationToWorldSpace | An orientation in Unity world space. |
playerIndex | The player whose content scale settings should be considered while converting between spaces. This is necessary because multiple players with differing scale settings may share the same gameboard. |
positionInGameboardSpace | The resulting position in gameboard space. |
rotationToGameboardSpace | The resulting orientation in gameboard space. |
Definition at line 485 of file GameBoard.cs.
References TiltFive.Player.TryGetSettings().
Referenced by TiltFive.GameBoard.InverseTransformPose().
bool TiltFive.GameBoard.TransformPoint | ( | Vector3 | pointInGameboardSpace, |
PlayerIndex | playerIndex, | ||
out Vector3 | pointInWorldSpace | ||
) |
Transforms the provided position from gameboard space to world space.
pointInGameboardSpace | A point in gameboard space. |
playerIndex | The player whose content scale settings should be considered while converting between spaces. This is necessary because multiple players with differing scale settings may share the same gameboard. |
pointInWorldSpace | The resulting point in Unity world space. |
Definition at line 461 of file GameBoard.cs.
References TiltFive.Player.TryGetSettings().
bool TiltFive.GameBoard.TransformPose | ( | Pose | poseInGameboardSpace, |
PlayerIndex | playerIndex, | ||
out Pose | poseInWorldSpace | ||
) |
Transforms the provided pose from gameboard space to world space.
poseInGameboardSpace | A position and orientation in gameboard space. |
playerIndex | The player whose content scale settings should be considered while converting between spaces. This is necessary because multiple players with differing scale settings may share the same gameboard. |
poseInWorldSpace | The resulting position and orientation in Unity world space. |
Definition at line 439 of file GameBoard.cs.
References TiltFive.GameBoard.TransformPose(), and TiltFive.Player.TryGetSettings().
bool TiltFive.GameBoard.TransformPose | ( | Vector3 | positionInGameboardSpace, |
Quaternion | rotationToGameboardSpace, | ||
PlayerIndex | playerIndex, | ||
out Vector3 | positionInWorldSpace, | ||
out Quaternion | rotationToWorldSpace | ||
) |
Transforms the provided pose from gameboard space to world space.
positionInGameboardSpace | A position in gameboard space. |
rotationToGameboardSpace | An orientation in gameboard space. |
playerIndex | The player whose content scale settings should be considered while converting between spaces. This is necessary because multiple players with differing scale settings may share the same gameboard. |
positionInWorldSpace | The resulting position in Unity world space. |
rotationToWorldSpace | The resulting orientation in Unity world space. |
Definition at line 414 of file GameBoard.cs.
References TiltFive.Player.TryGetSettings().
Referenced by TiltFive.GameBoard.TransformPose().
|
static |
Attempts to obtain the physical dimensions for a particular gameboard type.
gameboardType | |
gameboardDimensions |
Definition at line 344 of file GameBoard.cs.
References TiltFive.Logging.Log.Error().
|
static |
Attempts to obtain the physical dimensions for a particular gameboard type.
gameboardType | |
gameboardExtents |
Definition at line 377 of file GameBoard.cs.
References TiltFive.Logging.Log.Error().
|
static |
Attempts to check the latest glasses pose for the current gameboard type, such as LE, XE, or none.
gameboardType | Output gameboard type. Contains GameboardType.GameboardType_None if no pose was provided, which can happen if the user looks away and the head tracking camera loses sight of the gameboard. |
Definition at line 318 of file GameBoard.cs.
|
static |
Definition at line 323 of file GameBoard.cs.
References TiltFive.GameBoard.playerGameboards.
GameboardType TiltFive.GameBoard.GameboardType |
The gameboard configuration, such as LE, XE, or folded XE.
Definition at line 57 of file GameBoard.cs.
float TiltFive.GameBoard.GizmoOpacity = 0.75f |
Sets the opacity of the game board gizmo in the editor.
Definition at line 50 of file GameBoard.cs.
float TiltFive.GameBoard.GridHeightOffset = 0f |
Definition at line 41 of file GameBoard.cs.
|
staticprivate |
Definition at line 95 of file GameBoard.cs.
Referenced by TiltFive.GameBoard.TryGetGameboardType().
bool TiltFive.GameBoard.ShowGizmo |
Shows the game board gizmo in the editor.
Definition at line 36 of file GameBoard.cs.
bool TiltFive.GameBoard.ShowGrid |
Definition at line 39 of file GameBoard.cs.
bool TiltFive.GameBoard.StickyHeightOffset = true |
Definition at line 42 of file GameBoard.cs.