![]() |
VARJO TRACKING PLUGIN SDK DOCUMENTATION
|
Go to the source code of this file.
Data Structures | |
struct | varjo_Matrix4x4 |
Double precision 4x4 matrix. More... | |
struct | varjo_IMUComponentCalibrationInfo |
Structure containing calibration parameters for an IMU device. More... | |
struct | varjo_ImuSample |
Structure describing a sample of IMU data. More... | |
struct | varjo_PluginUtilityAPI |
struct | varjo_Quaternion |
Double precision quaternion. More... | |
struct | varjo_DevicePose |
Structure describing tracked device pose. More... | |
Macros | |
#define | VARJO_FNTABLE_CALLTYPE |
Typedefs | |
typedef uint64_t | varjo_PluginType |
Bit-field type determining type of plugin API. More... | |
typedef int64_t | varjo_PluginStatus |
Plugin status. More... | |
typedef struct varjo_ConfigurationKeyIterator_t * | varjo_ConfigurationKeyIterator |
Settings key enumeration handle. More... | |
typedef struct varjo_PluginUtilitySession_t * | varjo_PluginUtilitySession |
varjo_PluginUtilitySession More... | |
typedef struct varjo_Matrix4x4 | varjo_Matrix4x4 |
Double precision 4x4 matrix. More... | |
typedef uint64_t | varjo_IMUCapability |
Bit-field type determining capabilities of IMU hardware. More... | |
typedef uint64_t | varjo_IMUDataOffscale |
Bit-field type determining which values of IMU data are off-scale. More... | |
typedef uint64_t | varjo_IMUDataInvalid |
Bit-field type determining which values of IMU data are not valid, e.g. More... | |
typedef int64_t | varjo_IMUComponent |
Type identifying IMU component type. More... | |
typedef struct varjo_IMUComponentCalibrationInfo | varjo_IMUDeviceCalibrationInfo |
Structure containing calibration parameters for an IMU device. More... | |
typedef struct varjo_ImuSample | varjo_ImuSample |
Structure describing a sample of IMU data. More... | |
typedef int64_t | varjo_PluginSystemState |
Plugin system state. More... | |
typedef struct varjo_PluginUtilityAPI | varjo_PluginUtilityAPI |
typedef struct varjo_PluginContext_t * | varjo_PluginContext |
Plugin session context. More... | |
typedef uint64_t | varjo_PoseFlags |
Bit-field type determining tracking status. More... | |
typedef struct varjo_Quaternion | varjo_Quaternion |
Double precision quaternion. More... | |
typedef struct varjo_DevicePose | varjo_DevicePose |
Structure describing tracked device pose. More... | |
Variables | |
static const varjo_PluginType | varjo_PluginType_HMD_Tracker = 0x01 |
Flag indicating this plugin provides HMD tracking functionality. More... | |
static const varjo_PluginStatus | varjo_PluginStatus_OK = 0 |
Plugin status OK. More... | |
static const varjo_IMUCapability | varjo_IMUCapability_Acceleration = 0x01 |
IMU HW is capable of reporting accelerometer measurements. More... | |
static const varjo_IMUCapability | varjo_IMUCapability_AngularVelocity = 0x02 |
IMU HW is capable of reporting gyro measurements. More... | |
static const varjo_IMUCapability | varjo_IMUCapability_Attitude = 0x04 |
IMU HW is capable of reporting magnetometer measurements. More... | |
static const varjo_IMUDataOffscale | varjo_IMUDataOffscale_AccelerationX = 0x001 |
Flag indicating the X-axis acceleration measurement is off-scale. More... | |
static const varjo_IMUDataOffscale | varjo_IMUDataOffscale_AccelerationY = 0x002 |
Flag indicating the Y-axis acceleration measurement is off-scale. More... | |
static const varjo_IMUDataOffscale | varjo_IMUDataOffscale_AccelerationZ = 0x004 |
Flag indicating the Z-axis acceleration measurement is off-scale. More... | |
static const varjo_IMUDataOffscale | varjo_IMUDataOffscale_AngularVelocityX = 0x008 |
Flag indicating the X-axis angular velocity measurement is off-scale. More... | |
static const varjo_IMUDataOffscale | varjo_IMUDataOffscale_AngularVelocityY = 0x010 |
Flag indicating the Y-axis angular velocity measurement is off-scale. More... | |
static const varjo_IMUDataOffscale | varjo_IMUDataOffscale_AngularVelocityZ = 0x020 |
Flag indicating the Z-axis angular velocity measurement is off-scale. More... | |
static const varjo_IMUDataOffscale | varjo_IMUDataOffscale_AttitudeX = 0x040 |
Flag indicating the X-axis attitude measurement is off-scale. More... | |
static const varjo_IMUDataOffscale | varjo_IMUDataOffscale_AttitudeY = 0x080 |
Flag indicating the Y-axis attitude measurement is off-scale. More... | |
static const varjo_IMUDataOffscale | varjo_IMUDataOffscale_AttitudeZ = 0x100 |
Flag indicating the Z-axis attitudey measurement is off-scale. More... | |
static const varjo_IMUDataInvalid | varjo_IMUDataInvalid_AccelerationX = 0x001 |
Flag indicating the X-axis acceleration measurement is not valid. More... | |
static const varjo_IMUDataInvalid | varjo_IMUDataInvalid_AccelerationY = 0x002 |
Flag indicating the Y-axis acceleration measurement is not valid. More... | |
static const varjo_IMUDataInvalid | varjo_IMUDataInvalid_AccelerationZ = 0x004 |
Flag indicating the Z-axis acceleration measurement is not valid. More... | |
static const varjo_IMUDataInvalid | varjo_IMUDataInvalid_AngularVelocityX = 0x008 |
Flag indicating the X-axis angular velocity measurement is not valid. More... | |
static const varjo_IMUDataInvalid | varjo_IMUDataInvalid_AngularVelocityY = 0x010 |
Flag indicating the Y-axis angular velocity measurement is not valid. More... | |
static const varjo_IMUDataInvalid | varjo_IMUDataInvalid_AngularVelocityZ = 0x020 |
Flag indicating the Z-axis angular velocity measurement is not valid. More... | |
static const varjo_IMUDataInvalid | varjo_IMUDataInvalid_AttitudeX = 0x040 |
Flag indicating the X-axis attitude measurement is not valid. More... | |
static const varjo_IMUDataInvalid | varjo_IMUDataInvalid_AttitudeY = 0x080 |
Flag indicating the Y-axis attitude measurement is not valid. More... | |
static const varjo_IMUDataInvalid | varjo_IMUDataInvalid_AttitudeZ = 0x100 |
Flag indicating the Z-axis attitude measurement is not valid. More... | |
static const varjo_IMUComponent | varjo_IMUComponent_Accelerometer = 1 |
Constant identifying IMU component accelerometer. More... | |
static const varjo_IMUComponent | varjo_IMUComponent_Gyro = 2 |
Constant identifying IMU component gyro. More... | |
static const varjo_IMUComponent | varjo_IMUComponent_Magnetometer = 3 |
Constant identifying IMU component magnetometer. More... | |
static const varjo_PluginSystemState | varjo_PluginSystemState_OK = 0 |
Plugin system is functioning correctly. More... | |
static const varjo_PluginSystemState | varjo_PluginSystemState_Warning = 1 |
Plugin system is reporting a state requiring user attention e.g. battery low. More... | |
static const varjo_PluginSystemState | varjo_PluginSystemState_CriticalError = 2 |
Plugin system is reporting a critical error state, e.g. tracking failure. More... | |
static const varjo_PoseFlags | varjo_PoseFlags_Ok = 0x1 |
Flag indicating that the tracking is OK. More... | |
static const varjo_PoseFlags | varjo_PoseFlags_TrackingLost = 0x2 |
Flag indicating that no tracking data is available. More... | |
static const varjo_PoseFlags | varjo_PoseFlags_TrackingDisconnected = 0x4 |
Flag indicating that the tracker is disconnected. More... | |
static const varjo_PoseFlags | varjo_PoseFlags_HasPosition = 0x08 |
Flag indicating that the pose has position information. More... | |
static const varjo_PoseFlags | varjo_PoseFlags_HasRotation = 0x10 |
Flag indicating that the pose has rotation information. More... | |
static const varjo_PoseFlags | varjo_PoseFlags_HasVelocity = 0x20 |
Flag indicating that the pose has velocity information. More... | |
static const varjo_PoseFlags | varjo_PoseFlags_HasAngularVelocity = 0x40 |
Flag indicating that the pose has angular velocity information. More... | |
static const varjo_PoseFlags | varjo_PoseFlags_HasAcceleration = 0x80 |
Flag indicating that the pose has acceleration information. More... | |
static const varjo_PoseFlags | varjo_PoseFlags_HasConfidence = 0x100 |
Flag indicating that the pose has confidence information. More... | |
struct varjo_Matrix4x4 |
struct varjo_IMUComponentCalibrationInfo |
Structure containing calibration parameters for an IMU device.
Data Fields | ||
---|---|---|
varjo_Matrix3x3 | scale | Calibration scale. |
varjo_Vector3D | bias | Calibration bias. |
struct varjo_ImuSample |
Structure describing a sample of IMU data.
Data Fields | ||
---|---|---|
varjo_Nanoseconds | timeStamp | IMU sample timestamp (ns) |
varjo_Vector3D | acceleration | Device acceleration (m/s^2) |
varjo_Vector3D | angularVelocity | Device angular velocity (radians/s) |
varjo_Vector3D | attitude | Device attitude. |
varjo_IMUDataOffscale | offscaleFlags | Offscale flags. |
varjo_IMUDataInvalid | validityFlags | Validity flags. |
struct varjo_PluginUtilityAPI |
Utility functions plugins can call
Data Fields | ||||||||
---|---|---|---|---|---|---|---|---|
typedef const char *(VARJO_FNTABLE_CALLTYPE * | GetProductId_t |
Returns Varjo product id string.
| ||||||
typedef varjo_IMUCapability(VARJO_FNTABLE_CALLTYPE * | GetIMUCapabilities_t |
Returns hardware capabilities of the IMU.
| ||||||
typedef varjo_Matrix4x4(VARJO_FNTABLE_CALLTYPE * | GetIMUToHMDTransform_t |
Returns transformation matrix between IMU and the HMD coordinate systems.
| ||||||
typedef void(VARJO_FNTABLE_CALLTYPE * | GetIMUComponentCalibration_t |
Returns calibration for an IMU component. In VR-1, XR-1 and VR-2 series HMDs the IMU is located (from HMD user's perspective): 0.5mm to the right, 13.4mm down and 57.2mm forward from the HMD tracking point. IMU is oriented such that its positive X points right, positive Y points down and positive Z points forward. Calibration parameters are calculated after production and are constant in run time. Calibration can be applied this way:
| ||||||
typedef int32_t(VARJO_FNTABLE_CALLTYPE * | ReadIMUSamples_t |
Reads up to sampleCount samples of varjo_ImuSample into a samples buffer. The
| ||||||
typedef varjo_Bool(VARJO_FNTABLE_CALLTYPE * | SyncConfiguration_t |
Atomically applies set configuration.
| ||||||
typedef const char *(VARJO_FNTABLE_CALLTYPE * | EnumConfigurationKeys_t |
Enumerates configuration keys.
| ||||||
typedef void(VARJO_FNTABLE_CALLTYPE * | SetConfigurationString_t |
Sets configuration entry.
| ||||||
typedef int32_t(VARJO_FNTABLE_CALLTYPE * | GetConfigurationString_t |
Writes configuration entry.
| ||||||
typedef varjo_Nanoseconds(VARJO_FNTABLE_CALLTYPE * | GetCurrentSystemTime_t |
Returns current system time.
| ||||||
typedef void(VARJO_FNTABLE_CALLTYPE * | WriteLogMessage_t |
Writes a message to the log.
| ||||||
typedef void(VARJO_FNTABLE_CALLTYPE * | SetPluginSystemState_t |
Indicates a plugin system state to Varjo SW stack.
|
Data Fields | ||
---|---|---|
GetProductId_t | GetProductId |
|
GetIMUCapabilities_t | GetIMUCapabilities |
|
GetIMUToHMDTransform_t | GetIMUToHMDTransform |
|
GetIMUComponentCalibration_t | GetIMUComponentCalibration |
|
ReadIMUSamples_t | ReadIMUSamples |
|
SyncConfiguration_t | SyncConfiguration |
|
EnumConfigurationKeys_t | EnumConfigurationKeys |
|
SetConfigurationString_t | SetConfigurationString |
|
GetConfigurationString_t | GetConfigurationString |
|
GetCurrentSystemTime_t | GetCurrentSystemTime |
|
WriteLogMessage_t | WriteLogMessage |
|
SetPluginSystemState_t | SetPluginSystemState |
|
struct varjo_Quaternion |
struct varjo_DevicePose |
Structure describing tracked device pose.
Coordinate system is right-handed, positive X goes right, positive Y goes up and negative Z goes forward from HMD users perspective. Distance unit is meters.
Data Fields | ||
---|---|---|
varjo_Nanoseconds | timeStamp | Pose timestamp (ns) |
int64_t | frameNo | Frame number, increases monotonically. |
varjo_Vector3D | position | Device position (m) |
varjo_Quaternion | rotation | Device rotation. |
varjo_Vector3D | velocity | Device linear velocity (m/s) |
varjo_Vector3D | angularVelocity | Device angular velocity (radians/s) |
varjo_Vector3D | acceleration | Device acceleration (m/s^2) |
varjo_PoseFlags | poseFlags | Bit field value describing pose. |
double | confidence | Tracker confidence. |
#define VARJO_FNTABLE_CALLTYPE |
typedef uint64_t varjo_PluginType |
Bit-field type determining type of plugin API.
typedef int64_t varjo_PluginStatus |
Plugin status.
typedef struct varjo_ConfigurationKeyIterator_t* varjo_ConfigurationKeyIterator |
Settings key enumeration handle.
typedef struct varjo_PluginUtilitySession_t* varjo_PluginUtilitySession |
varjo_PluginUtilitySession
typedef struct varjo_Matrix4x4 varjo_Matrix4x4 |
Double precision 4x4 matrix.
The matrix usage convention is that values are stored in column-major order.
typedef uint64_t varjo_IMUCapability |
Bit-field type determining capabilities of IMU hardware.
typedef uint64_t varjo_IMUDataOffscale |
Bit-field type determining which values of IMU data are off-scale.
These flags are set when a corresponding sensor reading exceeds a limit of it's measurement range
typedef uint64_t varjo_IMUDataInvalid |
Bit-field type determining which values of IMU data are not valid, e.g.
in case the IMU HW can not provide corresponding measurement type, or does not have a measurement sample
typedef int64_t varjo_IMUComponent |
Type identifying IMU component type.
typedef struct varjo_IMUComponentCalibrationInfo varjo_IMUDeviceCalibrationInfo |
Structure containing calibration parameters for an IMU device.
typedef struct varjo_ImuSample varjo_ImuSample |
Structure describing a sample of IMU data.
typedef int64_t varjo_PluginSystemState |
Plugin system state.
typedef struct varjo_PluginUtilityAPI varjo_PluginUtilityAPI |
typedef struct varjo_PluginContext_t* varjo_PluginContext |
Plugin session context.
typedef uint64_t varjo_PoseFlags |
Bit-field type determining tracking status.
typedef struct varjo_Quaternion varjo_Quaternion |
Double precision quaternion.
typedef struct varjo_DevicePose varjo_DevicePose |
Structure describing tracked device pose.
Coordinate system is right-handed, positive X goes right, positive Y goes up and negative Z goes forward from HMD users perspective. Distance unit is meters.
varjo_PluginType varjo_GetPluginType | ( | ) |
Provides plugin types supported by the plugin library.
uint64_t varjo_GetPluginAPIVersion | ( | ) |
Provides the API version number supported by the plugin.
Use VARJO_PLUGIN_API_VERSION macro to indicate supported API version number.
const char* varjo_GetPluginName | ( | ) |
Provides plugin name.
const char* varjo_GetPluginStatusDescription | ( | varjo_PluginStatus | pluginStatus | ) |
Provides a string description of a given status code.
pluginStatus | - plugin status code |
varjo_PluginStatus varjo_PluginInit | ( | const varjo_PluginUtilityAPI * | pluginUtilityAPI, |
varjo_PluginUtilitySession | pluginUtilitySession, | ||
varjo_PluginContext * | context | ||
) |
Initializes plugin.
pluginUtilityAPI | - pointer to structure containing utility function pointers |
pluginUtilitySession | - handle to pass to varjo_PluginUtilityAPI functions |
context | - pointer to write plugin session context |
varjo_PluginStatus varjo_PluginShutdown | ( | varjo_PluginContext * | context | ) |
Deinitializes plugin.
context | - plugin session context acquired from varjo_PluginInit |
varjo_PluginStatus varjo_TrackerStart | ( | varjo_PluginContext | context | ) |
Starts the tracker processing.
context | - plugin session context acquired from varjo_PluginInit |
varjo_PluginStatus varjo_TrackerStop | ( | varjo_PluginContext | context | ) |
Stops the tracker processing.
context | - plugin session context acquired from varjo_PluginInit |
varjo_PluginStatus varjo_GetHMDPose | ( | varjo_PluginContext | context, |
varjo_Nanoseconds | timeStamp, | ||
varjo_DevicePose * | pose | ||
) |
Queries tracker for the HMD pose.
HMD's tracking point is expected to be located in the middle - between the centers of eye-piece lenses, and the on plane of the lens surface closest to the user eyes.
context | - plugin session context acquired from varjo_PluginInit |
timeStamp | - timestamp in nanoseconds for which tracking prediction is requested |
pose | - Pointer to a structure receiving tracking |
|
static |
Flag indicating this plugin provides HMD tracking functionality.
|
static |
Plugin status OK.
|
static |
IMU HW is capable of reporting accelerometer measurements.
|
static |
IMU HW is capable of reporting gyro measurements.
|
static |
IMU HW is capable of reporting magnetometer measurements.
|
static |
Flag indicating the X-axis acceleration measurement is off-scale.
|
static |
Flag indicating the Y-axis acceleration measurement is off-scale.
|
static |
Flag indicating the Z-axis acceleration measurement is off-scale.
|
static |
Flag indicating the X-axis angular velocity measurement is off-scale.
|
static |
Flag indicating the Y-axis angular velocity measurement is off-scale.
|
static |
Flag indicating the Z-axis angular velocity measurement is off-scale.
|
static |
Flag indicating the X-axis attitude measurement is off-scale.
|
static |
Flag indicating the Y-axis attitude measurement is off-scale.
|
static |
Flag indicating the Z-axis attitudey measurement is off-scale.
|
static |
Flag indicating the X-axis acceleration measurement is not valid.
|
static |
Flag indicating the Y-axis acceleration measurement is not valid.
|
static |
Flag indicating the Z-axis acceleration measurement is not valid.
|
static |
Flag indicating the X-axis angular velocity measurement is not valid.
|
static |
Flag indicating the Y-axis angular velocity measurement is not valid.
|
static |
Flag indicating the Z-axis angular velocity measurement is not valid.
|
static |
Flag indicating the X-axis attitude measurement is not valid.
|
static |
Flag indicating the Y-axis attitude measurement is not valid.
|
static |
Flag indicating the Z-axis attitude measurement is not valid.
|
static |
Constant identifying IMU component accelerometer.
|
static |
Constant identifying IMU component gyro.
|
static |
Constant identifying IMU component magnetometer.
|
static |
Plugin system is functioning correctly.
|
static |
Plugin system is reporting a state requiring user attention e.g. battery low.
|
static |
Plugin system is reporting a critical error state, e.g. tracking failure.
|
static |
Flag indicating that the tracking is OK.
|
static |
Flag indicating that no tracking data is available.
|
static |
Flag indicating that the tracker is disconnected.
|
static |
Flag indicating that the pose has position information.
|
static |
Flag indicating that the pose has rotation information.
|
static |
Flag indicating that the pose has velocity information.
|
static |
Flag indicating that the pose has angular velocity information.
|
static |
Flag indicating that the pose has acceleration information.
|
static |
Flag indicating that the pose has confidence information.