libctru  v1.6.0
Data Structures | Functions
qtm.h File Reference

QTM service. More...

Go to the source code of this file.

Data Structures

struct  QTM_HeadTrackingInfoCoord
 Head tracking coordinate pair. More...
 
struct  QTM_HeadTrackingInfo
 Head tracking info. More...
 

Functions

Result qtmInit (void)
 Initializes QTM.
 
void qtmExit (void)
 Exits QTM.
 
bool qtmCheckInitialized (void)
 Checks whether QTM is initialized. More...
 
bool qtmCheckHeadFullyDetected (QTM_HeadTrackingInfo *info)
 Checks whether a head is fully detected. More...
 
Result qtmConvertCoordToScreen (QTM_HeadTrackingInfoCoord *coord, float *screen_width, float *screen_height, u32 *x, u32 *y)
 Converts QTM coordinates to screen coordinates. More...
 
Result QTM_GetHeadTrackingInfo (u64 val, QTM_HeadTrackingInfo *out)
 Gets the current head tracking info. More...
 

Detailed Description

QTM service.

Function Documentation

◆ QTM_GetHeadTrackingInfo()

Result QTM_GetHeadTrackingInfo ( u64  val,
QTM_HeadTrackingInfo out 
)

Gets the current head tracking info.

Parameters
valNormally 0.
outPointer to write head tracking info to.
Examples
qtm/source/main.c.

◆ qtmCheckHeadFullyDetected()

bool qtmCheckHeadFullyDetected ( QTM_HeadTrackingInfo info)

Checks whether a head is fully detected.

Parameters
infoTracking info to check.
Examples
qtm/source/main.c.

◆ qtmCheckInitialized()

bool qtmCheckInitialized ( void  )

Checks whether QTM is initialized.

Returns
Whether QTM is initialized.
Examples
qtm/source/main.c.

◆ qtmConvertCoordToScreen()

Result qtmConvertCoordToScreen ( QTM_HeadTrackingInfoCoord coord,
float *  screen_width,
float *  screen_height,
u32 x,
u32 y 
)

Converts QTM coordinates to screen coordinates.

Parameters
coordCoordinates to convert.
screen_widthWidth of the screen. Can be NULL to use the default value for the top screen.
screen_heightHeight of the screen. Can be NULL to use the default value for the top screen.
xPointer to output the screen X coordinate to.
yPointer to output the screen Y coordinate to.
Examples
qtm/source/main.c.