Tilt Five Unity SDK 1.4.2
Loading...
Searching...
No Matches
TiltFive.GameBoard Class Reference

Represents the game board. More...

Inheritance diagram for TiltFive.GameBoard:
TiltFive.UniformScaleTransform

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  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  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.
bool TransformPose (Pose poseInGameboardSpace, PlayerIndex playerIndex, out Pose poseInWorldSpace)
 Transforms the provided pose from gameboard space to world space.
bool TransformPoint (Vector3 pointInGameboardSpace, PlayerIndex playerIndex, out Vector3 pointInWorldSpace)
 Transforms the provided position from gameboard space to world space.
bool InverseTransformPose (Vector3 positionInWorldSpace, Quaternion rotationToWorldSpace, PlayerIndex playerIndex, out Vector3 positionInGameboardSpace, out Quaternion rotationToGameboardSpace)
 Transforms the provided pose from world space to gameboard space.
bool InverseTransformPose (Pose poseInWorldSpace, PlayerIndex playerIndex, out Pose poseInGameboardSpace)
 Transforms the provided pose from world space to gameboard space.
bool InverseTransformPoint (Vector3 pointInWorldSpace, PlayerIndex playerIndex, out Vector3 pointInGameboardSpace)
 Transforms the provided position from world space to gameboard space.
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.
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.
static bool TryGetGameboardExtents (GameboardType gameboardType, out GameboardExtents gameboardExtents)
 Attempts to obtain the physical dimensions for a particular gameboard type.

Public Attributes

bool ShowGizmo
 Shows the game board gizmo in the editor.
bool ShowGrid
float GridHeightOffset = 0f
bool StickyHeightOffset = true
float GizmoOpacity = 0.75f
 Sets the opacity of the game board gizmo in the editor.
GameboardType GameboardType
 The gameboard configuration, such as LE, XE, or folded XE.

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]).
Properties inherited from TiltFive.UniformScaleTransform
float localScale [get, set]
 The size of the object as a single float value, rather than a scale vector.
Vector3 position [get, set]
 The position vector for the associated transform.
Quaternion rotation [get, set]
 The rotation vector for the associated transform.

Detailed Description

Represents the game board.

Member Enumeration Documentation

◆ Corner

Represents ordinal positions around the gameboard, relative to a user positioned at the near (default) edge.

Enumerator
FarLeft 
FarRight 
NearLeft 
NearRight 

◆ Edge

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.

Enumerator
Near 

The near edge of the gameboard.

This is the side of the gameboard with the T5 logo.

Far 

The far edge of the gameboard.

This edge is positioned opposite the near edge.

Left 

The left edge of the gameboard.

From the perspective of a user sitting at the near edge of the gameboard, this edge is to their left.

Right 

The right edge of the gameboard.

From the perspective of a user sitting at the near edge of the gameboard, this edge is to their right.

Member Function Documentation

◆ InverseTransformPoint()

bool TiltFive.GameBoard.InverseTransformPoint ( Vector3 pointInWorldSpace,
PlayerIndex playerIndex,
out Vector3 pointInGameboardSpace )
inline

Transforms the provided position from world space to gameboard space.

Parameters
pointInWorldSpaceA position in Unity world space.
playerIndexThe 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.
pointInGameboardSpaceThe resulting point in gameboard space.
Returns
Returns false and sets pointInGameboardSpace to Vector3.zero if the function failed while calculating the transformed point; returns true otherwise. This function can fail if playerIndex is invalid.

◆ InverseTransformPose() [1/2]

bool TiltFive.GameBoard.InverseTransformPose ( Pose poseInWorldSpace,
PlayerIndex playerIndex,
out Pose poseInGameboardSpace )
inline

Transforms the provided pose from world space to gameboard space.

Parameters
poseInWorldSpaceA position and orientation in Unity world space.
playerIndexThe 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.
poseInGameboardSpaceThe resulting position and orientation in gameboard space.
Returns
Returns false and sets poseInGameboardSpace to an empty pose if the function failed while calculating the transformed pose; returns true otherwise. This function can fail if playerIndex is invalid.

◆ InverseTransformPose() [2/2]

bool TiltFive.GameBoard.InverseTransformPose ( Vector3 positionInWorldSpace,
Quaternion rotationToWorldSpace,
PlayerIndex playerIndex,
out Vector3 positionInGameboardSpace,
out Quaternion rotationToGameboardSpace )
inline

Transforms the provided pose from world space to gameboard space.

Parameters
positionInWorldSpaceA position in Unity world space.
rotationToWorldSpaceAn orientation in Unity world space.
playerIndexThe 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.
positionInGameboardSpaceThe resulting position in gameboard space.
rotationToGameboardSpaceThe resulting orientation in gameboard space.
Returns
Returns false and sets positionInGameboardSpace and rotationToGameboardSpace to default values if the function failed while calculating the transformed pose; returns true otherwise. This function can fail if playerIndex is invalid.

◆ TransformPoint()

bool TiltFive.GameBoard.TransformPoint ( Vector3 pointInGameboardSpace,
PlayerIndex playerIndex,
out Vector3 pointInWorldSpace )
inline

Transforms the provided position from gameboard space to world space.

Parameters
pointInGameboardSpaceA point in gameboard space.
playerIndexThe 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.
pointInWorldSpaceThe resulting point in Unity world space.
Returns
Returns false and sets pointInWorldSpace to Vector3.zero if the function failed while calculating the transformed point; returns true otherwise. This function can fail if playerIndex is invalid.

◆ TransformPose() [1/2]

bool TiltFive.GameBoard.TransformPose ( Pose poseInGameboardSpace,
PlayerIndex playerIndex,
out Pose poseInWorldSpace )
inline

Transforms the provided pose from gameboard space to world space.

Parameters
poseInGameboardSpaceA position and orientation in gameboard space.
playerIndexThe 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.
poseInWorldSpaceThe resulting position and orientation in Unity world space.
Returns
Returns false and sets poseInWorldSpace to an empty pose if the function failed while calculating the transformed pose; returns true otherwise. This function can fail if playerIndex is invalid.

◆ TransformPose() [2/2]

bool TiltFive.GameBoard.TransformPose ( Vector3 positionInGameboardSpace,
Quaternion rotationToGameboardSpace,
PlayerIndex playerIndex,
out Vector3 positionInWorldSpace,
out Quaternion rotationToWorldSpace )
inline

Transforms the provided pose from gameboard space to world space.

Parameters
positionInGameboardSpaceA position in gameboard space.
rotationToGameboardSpaceAn orientation in gameboard space.
playerIndexThe 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.
positionInWorldSpaceThe resulting position in Unity world space.
rotationToWorldSpaceThe resulting orientation in Unity world space.
Returns
Returns false and sets positionInGameboardSpace and rotationToWorldSpace to default values if the function failed while calculating the transformed pose; returns true otherwise. This function can fail if playerIndex is invalid.

◆ TryGetGameboardDimensions()

bool TiltFive.GameBoard.TryGetGameboardDimensions ( GameboardType gameboardType,
out GameboardDimensions gameboardDimensions )
inlinestatic

Attempts to obtain the physical dimensions for a particular gameboard type.

Parameters
gameboardType
gameboardDimensions
Returns
Returns dimensions for GameboardType.GameboardType_LE if it fails.

◆ TryGetGameboardExtents()

bool TiltFive.GameBoard.TryGetGameboardExtents ( GameboardType gameboardType,
out GameboardExtents gameboardExtents )
inlinestatic

Attempts to obtain the physical dimensions for a particular gameboard type.

Parameters
gameboardType
gameboardExtents
Returns
Returns true on successful gameboard extents retrieval, and false otherwise. Use this return value to determine whether gameboardExtents is valid.

◆ TryGetGameboardType() [1/2]

bool TiltFive.GameBoard.TryGetGameboardType ( out GameboardType gameboardType)
inlinestatic

Attempts to check the latest glasses pose for the current gameboard type, such as LE, XE, or none.

Parameters
gameboardTypeOutput 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.
Returns
Returns true on successful pose retrieval, false otherwise.

◆ TryGetGameboardType() [2/2]

bool TiltFive.GameBoard.TryGetGameboardType ( PlayerIndex playerIndex,
out GameboardType gameboardType )
inlinestatic

Member Data Documentation

◆ GameboardType

GameboardType TiltFive.GameBoard.GameboardType

The gameboard configuration, such as LE, XE, or folded XE.

◆ GizmoOpacity

float TiltFive.GameBoard.GizmoOpacity = 0.75f

Sets the opacity of the game board gizmo in the editor.

◆ GridHeightOffset

float TiltFive.GameBoard.GridHeightOffset = 0f

◆ ShowGizmo

bool TiltFive.GameBoard.ShowGizmo

Shows the game board gizmo in the editor.

◆ ShowGrid

bool TiltFive.GameBoard.ShowGrid

◆ StickyHeightOffset

bool TiltFive.GameBoard.StickyHeightOffset = true

The documentation for this class was generated from the following file: