libctru  v2.4.1
Data Fields
QtmTrackingData Struct Reference

QTM processed eye tracking data, suitable for 3D programming. More...

#include <qtm.h>

Data Fields

bool eyesTracked
 Eye position detected or tracked with some confidence, equals (confidenceLevel > 0). Even if false, QTM may make a guess.
 
bool faceDetected
 Whether or not the entirety of the user's face has been detected with good confidence.
 
bool eyesDetected
 Whether or not the user's eyes have actually been detected with full confidence.
 
u8 _unused
 Unused.
 
bool clamped
 Whether or not the normalized eye coordinates have been clamped after accounting for lens distortion.
 
u8 _padding [3]
 Padding.
 
float confidenceLevel
 Eye tracking confidence level (0 to 1).
 
float eyeCameraCoordinates [QTM_EYE_NUM][2]
 Normalized eye coordinates, for each eye, after accounting for lens distortion, centered around camera. More...
 
float eyeWorldCoordinates [QTM_EYE_NUM][2]
 Normalized eye coordinates, for each eye, in world space. More...
 
float dPitch
 Difference in gyro pitch from position at console boot.
 
float dYaw
 Difference in gyro yaw from position at console boot.
 
float dRoll
 Difference in gyro roll from position at console boot.
 
s64 samplingTick
 Time point the current measurements were made.
 

Detailed Description

QTM processed eye tracking data, suitable for 3D programming.

Field Documentation

◆ eyeCameraCoordinates

float QtmTrackingData::eyeCameraCoordinates[QTM_EYE_NUM][2]

Normalized eye coordinates, for each eye, after accounting for lens distortion, centered around camera.

X coord is in the -1 to 1 range, and Y coord range depends on inverse aspect ratio (-0.75 to 0.75 on real hardware).

Note
On real hardware, X coord equals ((rawX / 160.0) - 1.00) * 1.0639 before clamping.
On real hardware, Y coord equals ((rawY / 160.0) - 0.75) * 1.0637 before clamping.

◆ eyeWorldCoordinates

float QtmTrackingData::eyeWorldCoordinates[QTM_EYE_NUM][2]

Normalized eye coordinates, for each eye, in world space.

Corresponds to eyeCameraCoordinates multiplied by tangent of field of view.

Note
On real hardware, X coord equals eyeCameraCoordinates.x * tan(64.9 deg / 2).
On real hardware, Y coord equals eyeCameraCoordinates.x * tan(51.0 deg / 2).

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