Fove SDK
v0.18.0
|
This file contains the entire FOVE API, no other headers are needed. More...
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
Classes | |
struct | Fove_AdapterId |
Struct used to identify a GPU adapter (Windows only) More... | |
struct | Fove_BitmapImage |
A 2D bitmap image. More... | |
struct | Fove_BoundingBox |
A bounding box. More... | |
struct | Fove_Buffer |
A generic memory buffer. More... | |
struct | Fove_CalibrationData |
Provide all the calibration data needed to render the current state of the calibration process. More... | |
struct | Fove_CalibrationOptions |
Parameters specifying how to run a calibration process. More... | |
struct | Fove_CalibrationTarget |
Represent a calibration target of the calibration process. More... | |
struct | Fove_CameraObject |
Represents a camera in a 3D world. More... | |
struct | Fove_ColliderCube |
Define a cube collider shape. More... | |
struct | Fove_ColliderMesh |
Define a mesh collider shape. More... | |
struct | Fove_ColliderSphere |
Define a sphere collider shape. More... | |
struct | Fove_CompositorLayer |
Struct used to store information about an existing compositor layer (after it is created) More... | |
struct | Fove_CompositorLayerCreateInfo |
Struct used to define the settings for a compositor client. More... | |
struct | Fove_CompositorLayerEyeSubmitInfo |
Struct used to conglomerate the texture settings for a single eye, when submitting a given layer. More... | |
struct | Fove_CompositorLayerSubmitInfo |
Struct used to conglomerate the texture settings when submitting a given layer. More... | |
struct | Fove_CompositorTexture |
Base class of API-specific texture classes. More... | |
struct | Fove_DX11Texture |
Struct used to submit a DirectX 11 texture. More... | |
struct | Fove_EyeData |
Eye related information. More... | |
struct | Fove_EyeShape |
Specify the shape of an eye (research API) More... | |
struct | Fove_GazableObject |
Represents an object in a 3D world. More... | |
struct | Fove_GazeConvergenceData |
Struct to represent the vector pointing where the user is looking at. More... | |
struct | Fove_GazeVector |
Struct to represent a unit vector out from the eye center along which that eye is looking. More... | |
struct | Fove_GLTexture |
Struct used to submit an OpenGL texture. More... | |
struct | Fove_HeadsetHardwareInfo |
Struct Contains hardware information for the headset. More... | |
struct | Fove_Matrix44 |
Struct to hold a rectangular array. More... | |
struct | Fove_MetalTexture |
Struct used to submit a texture using the Apple Metal API. More... | |
struct | Fove_ObjectCollider |
Represents a colliding part of a gazable object. More... | |
struct | Fove_ObjectPose |
Represents the pose of an object of the scene. More... | |
struct | Fove_Pose |
Struct to represent a combination of position and orientation of Fove Headset. More... | |
struct | Fove_ProjectionParams |
Struct holding information about projection frustum planes. More... | |
struct | Fove_Quaternion |
Struct representation on a quaternion. More... | |
struct | Fove_Ray |
Struct to represent a Ray. More... | |
struct | Fove_ResearchGaze |
Struct for returning gaze data from the research API. More... | |
struct | Fove_TextureBounds |
Specify a region of a texture in normalized space. More... | |
struct | Fove_Vec2 |
Struct to represent a 2D-vector. More... | |
struct | Fove_Vec2i |
Struct to represent a 2D-vector of integers. More... | |
struct | Fove_Vec3 |
Struct to represent a 3D-vector. More... | |
struct | Fove_Versions |
Struct to list various version info about the FOVE software. More... | |
struct | Fove_VulkanContext |
Struct to represent a suite of vulkan components to be used for texture submission. More... | |
struct | Fove_VulkanTexture |
struct | Fove_VulkanTextureResources |
Struct to hold handles to resources for a texture. More... | |
Macros | |
#define | FOVE_CALLBACK |
Defines any needed modifiers to function pointers for callbacks, eg. to use a different calling convention. | |
#define | FOVE_CONSTEXPR const |
Helper for declaring a compile time constant. | |
#define | FOVE_DEFINE_CXX_API 0 |
Macro that controls whether the C++ API will be defined. More... | |
#define | FOVE_DEPRECATED(func, rem) func |
Helper for declaring deprecated functions. | |
#define | FOVE_ENUM(enumName) typedef enum |
Helper to start an API enum. | |
#define | FOVE_ENUM_END(enumName) Fove_ ## enumName |
Helper to finish an API enum. | |
#define | FOVE_ENUM_VAL(enumName, valueName) Fove_ ## enumName ## _ ## valueName |
Helper to add a value to an API enum. | |
#define | FOVE_EXPORT FOVE_EXTERN_C |
Helper for declaring the public visibility of a function. | |
#define | FOVE_EXTERN_C |
Helper for disabling name mangling, etc. | |
#define | FOVE_NOEXCEPT |
Define this to empty to remove noexcept specifiers from the API. | |
#define | FOVE_STRUCT(structName) typedef struct |
Helper to start an API struct. | |
#define | FOVE_STRUCT_END(structName) Fove_ ## structName |
Helper to complete an API struct. | |
#define | FOVE_STRUCT_END_NO_CXX_ALIAS(structName) Fove_ ## structName |
Helper to complete an API struct without aliasing it in C++. | |
#define | FOVE_STRUCT_VAL(memberName, defaultVal) memberName |
Helper to add a member to an API struct. | |
Typedefs | |
typedef struct Fove_Compositor_ * | Fove_Compositor |
Opaque type representing a compositor connection. | |
typedef struct Fove_Headset_ * | Fove_Headset |
Opaque type representing a headset object. | |
typedef struct Fove_ResearchHeadset_ * | Fove_ResearchHeadset |
Opaque type representing a headset with research-specific capabilities. | |
typedef struct VkDevice_T * | Fove_VkDevice |
Opaque type representing a vulkan logical device (It must have VK_KHR_external_memory and VK_KHR_external_memory_fd enabled) | |
typedef struct VkDeviceMemory_T * | Fove_VkDeviceMemory |
Opaque type representing a vulkan device memory region. | |
typedef struct VkImage_T * | Fove_VkImage |
Opaque type representing a vulkan image. | |
typedef struct VkImageView_T * | Fove_VkImageView |
Opaque type representing a vulkan image view. | |
typedef struct VkInstance_T * | Fove_VkInstance |
Opaque type representing a vulkan instance. | |
typedef struct VkPhysicalDevice_T * | Fove_VkPhysicalDevice |
Opaque type representing a vulkan physical device. | |
typedef struct VkQueue_T * | Fove_VkQueue |
Opaque type representing a vulkan queue. | |
Enumerations | |
enum | Fove_AlphaMode { Fove_AlphaMode_Auto = 0, Fove_AlphaMode_One = 1, Fove_AlphaMode_Sample = 2 } |
Enum to help interpret the alpha of texture. More... | |
enum | Fove_CalibrationMethod { Fove_CalibrationMethod_Default, Fove_CalibrationMethod_OnePoint, Fove_CalibrationMethod_Spiral } |
Indicate the calibration method to use. More... | |
enum | Fove_CalibrationState { Fove_CalibrationState_NotStarted, Fove_CalibrationState_HeadsetAdjustment, Fove_CalibrationState_WaitingForUser, Fove_CalibrationState_CollectingData, Fove_CalibrationState_ProcessingData, Fove_CalibrationState_Successful_HighQuality, Fove_CalibrationState_Successful_MediumQuality, Fove_CalibrationState_Successful_LowQuality, Fove_CalibrationState_Failed_Unknown, Fove_CalibrationState_Failed_InaccurateData, Fove_CalibrationState_Failed_NoRenderer, Fove_CalibrationState_Failed_NoUser, Fove_CalibrationState_Failed_Aborted } |
Indicate the state of a calibration process. More... | |
enum | Fove_ClientCapabilities { Fove_ClientCapabilities_None = 0x00, Fove_ClientCapabilities_Gaze = 0x01, Fove_ClientCapabilities_Orientation = 0x02, Fove_ClientCapabilities_Position = 0x04 } |
List of capabilities usable by clients. More... | |
enum | Fove_ColliderType { Fove_ColliderType_Cube = 0, Fove_ColliderType_Sphere = 1, Fove_ColliderType_Mesh = 2 } |
Specify the different collider shape types. More... | |
enum | Fove_CompositorLayerType { Fove_CompositorLayerType_Base = 0, Fove_CompositorLayerType_Overlay = 0x10000, Fove_CompositorLayerType_Diagnostic = 0x20000 } |
Compositor layer type, which defines how clients are composited. More... | |
enum | Fove_ErrorCode { Fove_ErrorCode_None = 0, Fove_ErrorCode_Connection_General = 1, Fove_ErrorCode_Connect_NotConnected = 7, Fove_ErrorCode_Connect_ServerUnreachable = 2, Fove_ErrorCode_Connect_RegisterFailed = 3, Fove_ErrorCode_Connect_DeregisterFailed = 8, Fove_ErrorCode_Connect_RuntimeVersionTooOld = 4, Fove_ErrorCode_Connect_HeartbeatNoReply = 5, Fove_ErrorCode_Connect_ClientVersionTooOld = 6, Fove_ErrorCode_API_General = 100, Fove_ErrorCode_API_InitNotCalled = 101, Fove_ErrorCode_API_InitAlreadyCalled = 102, Fove_ErrorCode_API_InvalidArgument = 103, Fove_ErrorCode_API_NotRegistered = 104, Fove_ErrorCode_API_NullInPointer = 110, Fove_ErrorCode_API_InvalidEnumValue = 111, Fove_ErrorCode_API_NullOutPointersOnly = 120, Fove_ErrorCode_API_OverlappingOutPointers = 121, Fove_ErrorCode_API_CompositorNotSwapped = 122, Fove_ErrorCode_API_Timeout = 130, Fove_ErrorCode_Data_General = 1000, Fove_ErrorCode_Data_RegisteredWrongVersion = 1001, Fove_ErrorCode_Data_UnreadableNotFound = 1002, Fove_ErrorCode_Data_NoUpdate = 1003, Fove_ErrorCode_Data_Uncalibrated = 1004, Fove_ErrorCode_Data_MissingIPCData = 1005, Fove_ErrorCode_Hardware_General = 2000, Fove_ErrorCode_Hardware_CoreFault = 2001, Fove_ErrorCode_Hardware_CameraFault = 2002, Fove_ErrorCode_Hardware_IMUFault = 2003, Fove_ErrorCode_Hardware_ScreenFault = 2004, Fove_ErrorCode_Hardware_SecurityFault = 2005, Fove_ErrorCode_Hardware_Disconnected = 2006, Fove_ErrorCode_Hardware_WrongFirmwareVersion = 2007, Fove_ErrorCode_Server_General = 3000, Fove_ErrorCode_Server_HardwareInterfaceInvalid = 3001, Fove_ErrorCode_Server_HeartbeatNotRegistered = 3002, Fove_ErrorCode_Server_DataCreationError = 3003, Fove_ErrorCode_Server_ModuleError_ET = 3004, Fove_ErrorCode_Code_NotImplementedYet = 4000, Fove_ErrorCode_Code_FunctionDeprecated = 4001, Fove_ErrorCode_Position_NoObjectsInView = 5000, Fove_ErrorCode_Position_NoDlibRegressor = 5001, Fove_ErrorCode_Position_NoCascadeClassifier = 5002, Fove_ErrorCode_Position_NoModel = 5003, Fove_ErrorCode_Position_NoImages = 5004, Fove_ErrorCode_Position_InvalidFile = 5005, Fove_ErrorCode_Position_NoCamParaSet = 5006, Fove_ErrorCode_Position_CantUpdateOptical = 5007, Fove_ErrorCode_Position_ObjectNotTracked = 5008, Fove_ErrorCode_Position_NoCameraFound = 5009, Fove_ErrorCode_Eye_Left_NoDlibRegressor = 6000, Fove_ErrorCode_Eye_Right_NoDlibRegressor = 6001, Fove_ErrorCode_Eye_CalibrationFailed = 6002, Fove_ErrorCode_Eye_LoadCalibrationFailed = 6003, Fove_ErrorCode_User_General = 7000, Fove_ErrorCode_User_ErrorLoadingProfile = 7001, Fove_ErrorCode_Compositor_UnableToCreateDeviceAndContext = 8000, Fove_ErrorCode_Compositor_UnableToUseTexture = 8001, Fove_ErrorCode_Compositor_DeviceMismatch = 8002, Fove_ErrorCode_Compositor_IncompatibleCompositorVersion = 8003, Fove_ErrorCode_Compositor_UnableToFindRuntime = 8004, Fove_ErrorCode_Compositor_DisconnectedFromRuntime = 8006, Fove_ErrorCode_Compositor_ErrorCreatingTexturesOnDevice = 8008, Fove_ErrorCode_Compositor_NoEyeSpecifiedForSubmit = 8009, Fove_ErrorCode_UnknownError = 9000, Fove_ErrorCode_Object_AlreadyRegistered = 10000, Fove_ErrorCode_Calibration_OtherRendererPrioritized = 11000, Fove_ErrorCode_License_FeatureAccessDenied = 12000, Fove_ErrorCode_Profile_DoesntExist = 13000, Fove_ErrorCode_Profile_NotAvailable = 13001, Fove_ErrorCode_Profile_InvalidName = 13002, Fove_ErrorCode_Config_DoesntExist = 14000, Fove_ErrorCode_Config_TypeMismatch = 14001 } |
The error codes that the Fove system may return. More... | |
enum | Fove_Eye { Fove_Eye_Neither = 0, Fove_Eye_Left = 1, Fove_Eye_Right = 2, Fove_Eye_Both = 3 } |
Enum to identify which eye is being used. More... | |
enum | Fove_EyeByEyeCalibration { Fove_EyeByEyeCalibration_Default, Fove_EyeByEyeCalibration_Disabled, Fove_EyeByEyeCalibration_Enabled } |
Indicate whether each eye should be calibrated separately or not. More... | |
enum | Fove_GazeCastPolicy { Fove_GazeCastPolicy_DismissBothEyeClosed, Fove_GazeCastPolicy_DismissOneEyeClosed, Fove_GazeCastPolicy_NeverDismiss } |
Specify when user gaze casts should be dismissed based on his eyes openness. More... | |
enum | Fove_GraphicsAPI { Fove_GraphicsAPI_DirectX = 0, Fove_GraphicsAPI_OpenGL = 1, Fove_GraphicsAPI_Metal = 2, Fove_GraphicsAPI_Vulkan = 3 } |
Enum for type of Graphics API. More... | |
enum | Fove_ImageType { Fove_ImageType_StereoEye = 0x00, Fove_ImageType_Position = 0x01 } |
Indicates the source of an image. More... | |
enum | Fove_LogLevel { Fove_LogLevel_Debug = 0, Fove_LogLevel_Warning = 1, Fove_LogLevel_Error = 2 } |
Severity level of log messages. More... | |
enum | Fove_ObjectGroup { Fove_ObjectGroup_Group0 = 1 << 0, Fove_ObjectGroup_Group1 = 1 << 1, Fove_ObjectGroup_Group2 = 1 << 2, Fove_ObjectGroup_Group3 = 1 << 3, Fove_ObjectGroup_Group4 = 1 << 4, Fove_ObjectGroup_Group5 = 1 << 5, Fove_ObjectGroup_Group6 = 1 << 6, Fove_ObjectGroup_Group7 = 1 << 7, Fove_ObjectGroup_Group8 = 1 << 8, Fove_ObjectGroup_Group9 = 1 << 9, Fove_ObjectGroup_Group10 = 1 << 10, Fove_ObjectGroup_Group11 = 1 << 11, Fove_ObjectGroup_Group12 = 1 << 12, Fove_ObjectGroup_Group13 = 1 << 13, Fove_ObjectGroup_Group14 = 1 << 14, Fove_ObjectGroup_Group15 = 1 << 15, Fove_ObjectGroup_Group16 = 1 << 16, Fove_ObjectGroup_Group17 = 1 << 17, Fove_ObjectGroup_Group18 = 1 << 18, Fove_ObjectGroup_Group19 = 1 << 19, Fove_ObjectGroup_Group20 = 1 << 20, Fove_ObjectGroup_Group21 = 1 << 21, Fove_ObjectGroup_Group22 = 1 << 22, Fove_ObjectGroup_Group23 = 1 << 23, Fove_ObjectGroup_Group24 = 1 << 24, Fove_ObjectGroup_Group25 = 1 << 25, Fove_ObjectGroup_Group26 = 1 << 26, Fove_ObjectGroup_Group27 = 1 << 27, Fove_ObjectGroup_Group28 = 1 << 28, Fove_ObjectGroup_Group29 = 1 << 29, Fove_ObjectGroup_Group30 = 1 << 30, Fove_ObjectGroup_Group31 = 1 << 31 } |
The groups of objects of the scene. | |
enum | Fove_ResearchCapabilities { Fove_ResearchCapabilities_None = 0x00, Fove_ResearchCapabilities_EyeImage = 0x01, Fove_ResearchCapabilities_PositionImage = 0x02 } |
Research-API-specific capabilities. | |
Functions | |
Fove_ErrorCode | fove_Compositor_createLayer (Fove_Compositor *, const Fove_CompositorLayerCreateInfo *layerInfo, Fove_CompositorLayer *outLayer) |
Creates a new layer within the compositor. More... | |
Fove_ErrorCode | fove_Compositor_destroy (Fove_Compositor *) |
Frees resources used by the compositor object, including memory and sockets. More... | |
Fove_ErrorCode | fove_Compositor_getAdapterId (Fove_Compositor *, Fove_AdapterId *outAdapterId) |
Returns the ID of the GPU currently attached to the headset. More... | |
Fove_ErrorCode | fove_Compositor_getLastRenderPose (Fove_Compositor *, Fove_Pose *outPose) |
Get the last cached pose for rendering purposes. | |
Fove_ErrorCode | fove_Compositor_isReady (Fove_Compositor *, bool *outIsReady) |
Returns true if we are connected to a running compositor and ready to submit frames for compositing. | |
Fove_ErrorCode | fove_Compositor_submit (Fove_Compositor *, const Fove_CompositorLayerSubmitInfo *submitInfo, size_t layerCount) |
Submit a frame to the compositor. More... | |
Fove_ErrorCode | fove_Compositor_waitForRenderPose (Fove_Compositor *, Fove_Pose *outPose) |
Wait for the most recent pose for rendering purposes. More... | |
Fove_ErrorCode | fove_Config_clearValue (const char *key) |
Reset the value of the provided key to its default value. More... | |
Fove_ErrorCode | fove_Config_getValue_bool (const char *key, bool *outValue) |
Get the value of the provided key from the FOVE config. More... | |
Fove_ErrorCode | fove_Config_getValue_float (const char *key, float *outValue) |
Get the value of the provided key from the FOVE config. More... | |
Fove_ErrorCode | fove_Config_getValue_int (const char *key, int *outValue) |
Get the value of the provided key from the FOVE config. More... | |
Fove_ErrorCode | fove_Config_getValue_string (const char *key, void(*callback)(const char *value, void *callbackData), void *callbackData) |
Get the value of the provided key from the FOVE config. More... | |
Fove_ErrorCode | fove_Config_setValue_bool (const char *key, bool value) |
Set the value of the provided key to the FOVE config. More... | |
Fove_ErrorCode | fove_Config_setValue_float (const char *key, float value) |
Set the value of the provided key to the FOVE config. More... | |
Fove_ErrorCode | fove_Config_setValue_int (const char *key, int value) |
Set the value of the provided key to the FOVE config. More... | |
Fove_ErrorCode | fove_Config_setValue_string (const char *key, const char *value) |
Set the value of the provided key to the FOVE config. More... | |
Fove_ErrorCode | fove_createHeadset (Fove_ClientCapabilities capabilities, Fove_Headset **outHeadset) |
Creates and returns an Fove_Headset object, which is the entry point to the entire API. More... | |
Fove_ErrorCode | fove_Headset_checkEyesClosed (Fove_Headset *, Fove_Eye *outEye) |
Writes out which eyes are closed. More... | |
Fove_ErrorCode | fove_Headset_checkEyesTracked (Fove_Headset *, Fove_Eye *outEye) |
Writes out which eyes are being tracked. More... | |
Fove_ErrorCode | fove_Headset_checkSoftwareVersions (Fove_Headset *) |
Checks whether the client can run against the installed version of the FOVE SDK. More... | |
Fove_ErrorCode | fove_Headset_createCompositor (Fove_Headset *, Fove_Compositor **outCompositor) |
Returns a compositor interface from the given headset. More... | |
Fove_ErrorCode | fove_Headset_createProfile (Fove_Headset *, const char *newName) |
Creates a new profile. More... | |
Fove_ErrorCode | fove_Headset_deleteProfile (Fove_Headset *, const char *profileName) |
Deletes an existing profile. More... | |
Fove_ErrorCode | fove_Headset_destroy (Fove_Headset *) |
Frees resources used by a headset object, including memory and sockets. More... | |
Fove_ErrorCode | fove_Headset_getCurrentProfile (Fove_Headset *, void(*callback)(const char *callbackProfileName, void *callbackData), void *callbackData) |
Gets the current profile. More... | |
Fove_ErrorCode | fove_Headset_getEyeToHeadMatrices (Fove_Headset *, Fove_Matrix44 *outLeft, Fove_Matrix44 *outRight) |
Writes out the matrices to convert from eye to head space coordinates. More... | |
Fove_ErrorCode | fove_Headset_getEyeTrackingCalibrationState (Fove_Headset *, Fove_CalibrationState *) |
Get the state of the currently running calibration process. | |
Fove_ErrorCode | fove_Headset_getGazeCastPolicy (Fove_Headset *, Fove_GazeCastPolicy *policy) |
Get the current gaze cast policy. More... | |
Fove_ErrorCode | fove_Headset_getGazeConvergence (Fove_Headset *, Fove_GazeConvergenceData *outConvergenceData) |
Writes out eye convergence data. More... | |
Fove_ErrorCode | fove_Headset_getGazeVectors (Fove_Headset *, Fove_GazeVector *outLeft, Fove_GazeVector *outRight) |
Writes out each eye's current gaze vector. More... | |
Fove_ErrorCode | fove_Headset_getGazeVectors2D (Fove_Headset *, Fove_Vec2 *outLeft, Fove_Vec2 *outRight) |
Writes out the user's 2D gaze position on the screens seen through the HMD's lenses. More... | |
Fove_ErrorCode | fove_Headset_getHardwareInfo (Fove_Headset *, Fove_HeadsetHardwareInfo *outHardwareInfo) |
Writes out the hardware information. More... | |
Fove_ErrorCode | fove_Headset_getLatestPose (Fove_Headset *, Fove_Pose *outPose) |
Writes out the pose of the head-mounted display. More... | |
Fove_ErrorCode | fove_Headset_getProfileDataPath (Fove_Headset *, const char *profileName, void(*callback)(const char *callbackProfileName, void *callbackData), void *callbackData) |
Gets the data folder for a given profile. More... | |
Fove_ErrorCode | fove_Headset_getProjectionMatricesLH (Fove_Headset *, float zNear, float zFar, Fove_Matrix44 *outLeftMat, Fove_Matrix44 *outRightMat) |
Writes out the values of passed-in left-handed 4x4 projection matrices. More... | |
Fove_ErrorCode | fove_Headset_getProjectionMatricesRH (Fove_Headset *, float zNear, float zFar, Fove_Matrix44 *outLeftMat, Fove_Matrix44 *outRightMat) |
Writes out the values of passed-in right-handed 4x4 projection matrices. More... | |
Fove_ErrorCode | fove_Headset_getRawProjectionValues (Fove_Headset *, Fove_ProjectionParams *outLeft, Fove_ProjectionParams *outRight) |
Writes out values for the view frustum of the specified eye at 1 unit away. More... | |
Fove_ErrorCode | fove_Headset_getRenderIOD (Fove_Headset *, float *outIOD) |
Interocular distance to use for rendering in meters. More... | |
Fove_ErrorCode | fove_Headset_getResearchHeadset (Fove_Headset *, Fove_ResearchCapabilities caps, Fove_ResearchHeadset **outHeadset) |
Converts an existing headset object into a research headset. More... | |
Fove_ErrorCode | fove_Headset_getSoftwareVersions (Fove_Headset *, Fove_Versions *outSoftwareVersions) |
Writes out the current software versions. More... | |
Fove_ErrorCode | fove_Headset_isEyeTrackingCalibrated (Fove_Headset *, bool *outEyeTrackingCalibrated) |
Writes out whether eye tracking has been calibrated. More... | |
Fove_ErrorCode | fove_Headset_isEyeTrackingCalibrating (Fove_Headset *, bool *outEyeTrackingCalibrating) |
Writes out whether eye tracking is in the process of performing a calibration. More... | |
Fove_ErrorCode | fove_Headset_isEyeTrackingEnabled (Fove_Headset *, bool *outEyeTrackingEnabled) |
Writes out whether the eye tracking hardware has started. More... | |
Fove_ErrorCode | fove_Headset_isEyeTrackingReady (Fove_Headset *, bool *outEyeTrackingReady) |
Writes out whether eye tracking is actively tracking an eye - or eyes. More... | |
Fove_ErrorCode | fove_Headset_isHardwareConnected (Fove_Headset *, bool *outHardwareConnected) |
Writes out whether an HMD is know to be connected or not. More... | |
Fove_ErrorCode | fove_Headset_isHardwareReady (Fove_Headset *, bool *outIsReady) |
Writes out whether the hardware for the requested capabilities has started. More... | |
Fove_ErrorCode | fove_Headset_isHmdAdjustmentGuiVisible (Fove_Headset *, bool *outHmdAdjustmentGuiVisible) |
Writes out whether or not the GUI that asks the user to adjust their headset is being displayed. More... | |
Fove_ErrorCode | fove_Headset_isMotionReady (Fove_Headset *, bool *outMotionReady) |
Writes out whether motion tracking hardware has started. More... | |
Fove_ErrorCode | fove_Headset_isPositionReady (Fove_Headset *, bool *outPositionReady) |
Writes out whether position tracking hardware has started and returns whether it was successful. More... | |
Fove_ErrorCode | fove_Headset_isUserPresent (Fove_Headset *, bool *outUserPresent) |
Writes out whether the user is wearing the headset or not. More... | |
Fove_ErrorCode | fove_Headset_listProfiles (Fove_Headset *, void(*callback)(const char *callbackProfileName, void *callbackData), void *callbackData) |
Lists all existing profiles. More... | |
Fove_ErrorCode | fove_Headset_registerCameraObject (Fove_Headset *, const Fove_CameraObject *camera) |
Registers an camera in the 3D world. More... | |
Fove_ErrorCode | fove_Headset_registerCapabilities (Fove_Headset *, Fove_ClientCapabilities caps) |
Registers a client capability, enabling the required hardware as needed. More... | |
Fove_ErrorCode | fove_Headset_registerGazableObject (Fove_Headset *, const Fove_GazableObject *object) |
Registers an object in the 3D world. More... | |
Fove_ErrorCode | fove_Headset_removeCameraObject (Fove_Headset *, int cameraId) |
Removes a previously registered camera from the scene. More... | |
Fove_ErrorCode | fove_Headset_removeGazableObject (Fove_Headset *, int objectId) |
Removes a previously registered 3D object from the scene. More... | |
Fove_ErrorCode | fove_Headset_renameProfile (Fove_Headset *, const char *oldName, const char *newName) |
Renames an existing profile. More... | |
Fove_ErrorCode | fove_Headset_setCurrentProfile (Fove_Headset *, const char *profileName) |
Sets the current profile. More... | |
Fove_ErrorCode | fove_Headset_setGazeCastPolicy (Fove_Headset *, Fove_GazeCastPolicy policy) |
Set the current gaze cast policy. More... | |
Fove_ErrorCode | fove_Headset_startEyeTrackingCalibration (Fove_Headset *, const Fove_CalibrationOptions *options) |
Starts eye tracking calibration. More... | |
Fove_ErrorCode | fove_Headset_stopEyeTrackingCalibration (Fove_Headset *) |
Stops eye tracking calibration if it's running, does nothing if it's not running. | |
Fove_ErrorCode | fove_Headset_tareOrientationSensor (Fove_Headset *) |
Tares the orientation of the headset. More... | |
Fove_ErrorCode | fove_Headset_tarePositionSensors (Fove_Headset *) |
Tares the position of the headset. More... | |
Fove_ErrorCode | fove_Headset_tickEyeTrackingCalibration (Fove_Headset *, float deltaTime, bool isVisible, Fove_CalibrationData *outCalibrationData) |
Tick the current calibration process and retrieve data information to render the current calibration state. More... | |
Fove_ErrorCode | fove_Headset_unregisterCapabilities (Fove_Headset *, Fove_ClientCapabilities caps) |
Unregisters a client capability previously registered. More... | |
Fove_ErrorCode | fove_Headset_updateCameraObject (Fove_Headset *, int cameraId, const Fove_ObjectPose *pose) |
Update the pose of a registered camera. More... | |
Fove_ErrorCode | fove_Headset_updateGazableObject (Fove_Headset *, int objectId, const Fove_ObjectPose *pose) |
Update a previously registered 3D object pose. More... | |
Fove_ErrorCode | fove_Headset_waitForNextEyeFrame (Fove_Headset *) |
Waits for next camera frame and associated eye tracking info becomes available. More... | |
Fove_ErrorCode | fove_logText (Fove_LogLevel level, const char *utf8Text) |
Writes some text to the FOVE log. More... | |
Fove_ErrorCode | fove_ResearchHeadset_getEyeShapes (Fove_ResearchHeadset *, Fove_EyeShape *outLeft, Fove_EyeShape *outRight) |
Returns the eye shape of the left and right eyes. More... | |
Fove_ErrorCode | fove_ResearchHeadset_getGaze (Fove_ResearchHeadset *, Fove_ResearchGaze *outGaze) |
Returns research-related gaze information. | |
Fove_ErrorCode | fove_ResearchHeadset_getImage (Fove_ResearchHeadset *, Fove_ImageType type, Fove_BitmapImage *outImage) |
Returns the latest image of the given type. More... | |
Fove_ErrorCode | fove_ResearchHeadset_registerCapabilities (Fove_ResearchHeadset *, Fove_ResearchCapabilities caps) |
Registers a research capability, enabling the required hardware as needed. More... | |
Fove_ErrorCode | fove_ResearchHeadset_turnOffPositionTrackingLEDs (Fove_ResearchHeadset *) |
Turns off position tracking LEDs all at once at a default intensity. More... | |
Fove_ErrorCode | fove_ResearchHeadset_turnOnPositionTrackingLEDs (Fove_ResearchHeadset *) |
Turns on position tracking LEDs all at once at a default intensity. More... | |
Fove_ErrorCode | fove_ResearchHeadset_unregisterCapabilities (Fove_ResearchHeadset *, Fove_ResearchCapabilities caps) |
Unregisters a research capability previously registered. More... | |
Variables | |
const int | fove_ObjectIdInvalid = -1 |
Predefined object ID to signify "no object". | |
This file contains the entire FOVE API, no other headers are needed.
#define FOVE_DEFINE_CXX_API 0 |
Macro that controls whether the C++ API will be defined.
The C API is always defined after including this header, but the C++ API is optional. In C++ mode, the C API is extended (for example, with default values for struct members) automatically.
User can set this macro to 0 or 1, either in code before including this, or via compile-flag to choose.
Defaults to 0 if the compiler is a C compiler, 1 if the compiler is a C++ compiler.
enum Fove_AlphaMode |
Enum to help interpret the alpha of texture.
Determines how to interpret the alpha of a compositor client texture
Indicate the calibration method to use.
Indicate the state of a calibration process.
A calibration process always starts from the NotStarted
state, then it can go back and forth between the WaitingForUser
& CollectingData
states, then it goes to the ProcessingData
state and finishes with the Successful
state.
A failure can happen any time during the process, and stops the process where it was.
From the ProcessingData
state the calibration process do not require any rendering and gameplay can be started if wanted but new calibration won't be effective before reaching the Successful
state.
List of capabilities usable by clients.
Most features require registering for the relevant capability. If a client queries data related to a capability it has not registered API_NotRegistered will be returned.
This enum is designed to be used as a flag set, so items may be binary logic operators like |.
The FOVE runtime will keep any given set of hardware/software running so long as one client is registering a capability.
The registration of a capability does not necessarily mean that the capability is running. For example, if no position tracking camera is attached, no position tracking will occur regardless of how many clients registered for it.
enum Fove_ColliderType |
enum Fove_ErrorCode |
The error codes that the Fove system may return.
enum Fove_Eye |
Indicate whether each eye should be calibrated separately or not.
enum Fove_GazeCastPolicy |
Specify when user gaze casts should be dismissed based on his eyes openness.
enum Fove_GraphicsAPI |
Enum for type of Graphics API.
Type of Graphics API Note: We currently only support DirectX
enum Fove_ImageType |
enum Fove_LogLevel |
Fove_ErrorCode fove_Compositor_createLayer | ( | Fove_Compositor * | , |
const Fove_CompositorLayerCreateInfo * | layerInfo, | ||
Fove_CompositorLayer * | outLayer | ||
) |
Creates a new layer within the compositor.
This function create a layer upon which frames may be submitted to the compositor by this client.
A connection to the compositor must exist for this to pass. This means you need to wait for fove_Compositor_isReady before calling this function. However, if connection to the compositor is lost and regained, this layer will persist. For this reason, you should not recreate your layers upon reconnection, simply create them once.
There is no way to delete a layer once created, other than to destroy the Fove_Compositor object. This is a feature we would like to add in the future.
layerInfo | The settings for the layer to be created |
outLayer | A struct where the defaults of the newly created layer will be written |
Fove_ErrorCode fove_Compositor_destroy | ( | Fove_Compositor * | ) |
Frees resources used by the compositor object, including memory and sockets.
Upon return, this compositor pointer should no longer be used.
Fove_ErrorCode fove_Compositor_getAdapterId | ( | Fove_Compositor * | , |
Fove_AdapterId * | outAdapterId | ||
) |
Returns the ID of the GPU currently attached to the headset.
For systems with multiple GPUs, submitted textures to the compositor must from the same GPU that the compositor is using
Fove_ErrorCode fove_Compositor_submit | ( | Fove_Compositor * | , |
const Fove_CompositorLayerSubmitInfo * | submitInfo, | ||
size_t | layerCount | ||
) |
Submit a frame to the compositor.
This function takes the feed from your game engine to the compositor for output.
submitInfo | An array of layerCount Fove_CompositorLayerSubmitInfo structs, each of which provides texture data for a unique layer |
layerCount | The number of layers you are submitting |
Fove_ErrorCode fove_Compositor_waitForRenderPose | ( | Fove_Compositor * | , |
Fove_Pose * | outPose | ||
) |
Wait for the most recent pose for rendering purposes.
All compositor clients should use this function as the sole means of limiting their frame rate. This allows the client to render at the correct frame rate for the HMD display. Upon this function returning, the client should proceed directly to rendering, to reduce the chance of missing the frame. If outPose is not null, this function will return the latest pose as a convenience to the caller. In general, a client's main loop should look like: { Update(); // Run AI, physics, etc, for the next frame compositor.WaitForRenderPose(&pose); // Wait for the next frame, and get the pose Draw(pose); // Render the scene using the new pose }
outPose | The latest pose of the headset. |
Fove_ErrorCode fove_Config_clearValue | ( | const char * | key | ) |
Reset the value of the provided key to its default value.
key | The key name of the value to reset, null-terminated and in UTF-8 |
Fove_ErrorCode fove_Config_getValue_bool | ( | const char * | key, |
bool * | outValue | ||
) |
Get the value of the provided key from the FOVE config.
key | The key name of the value to retrieve, null-terminated and in UTF-8 |
outValue | The value associated to the key if found. |
Fove_ErrorCode fove_Config_getValue_float | ( | const char * | key, |
float * | outValue | ||
) |
Get the value of the provided key from the FOVE config.
key | The key name of the value to retrieve, null-terminated and in UTF-8 |
outValue | The value associated to the key if found. |
Fove_ErrorCode fove_Config_getValue_int | ( | const char * | key, |
int * | outValue | ||
) |
Get the value of the provided key from the FOVE config.
key | The key name of the value to retrieve, null-terminated and in UTF-8 |
outValue | The value associated to the key if found. |
Fove_ErrorCode fove_Config_getValue_string | ( | const char * | key, |
void(*)(const char *value, void *callbackData) | callback, | ||
void * | callbackData | ||
) |
Get the value of the provided key from the FOVE config.
key | The key name of the value to retrieve, null-terminated and in UTF-8 |
callback | A function pointer to a function that will be called once if the key is present |
callbackData | An arbitrary pointer passed to the callback |
Fove_ErrorCode fove_Config_setValue_bool | ( | const char * | key, |
bool | value | ||
) |
Set the value of the provided key to the FOVE config.
key | The key name of the value to set, null-terminated and in UTF-8 |
value | The new value to set as the key value. |
Fove_ErrorCode fove_Config_setValue_float | ( | const char * | key, |
float | value | ||
) |
Set the value of the provided key to the FOVE config.
key | The key name of the value to set, null-terminated and in UTF-8 |
value | The new value to set as the key value. |
Fove_ErrorCode fove_Config_setValue_int | ( | const char * | key, |
int | value | ||
) |
Set the value of the provided key to the FOVE config.
key | The key name of the value to set, null-terminated and in UTF-8 |
value | The new value to set as the key value. |
Fove_ErrorCode fove_Config_setValue_string | ( | const char * | key, |
const char * | value | ||
) |
Set the value of the provided key to the FOVE config.
key | The key name of the value to set, null-terminated and in UTF-8 |
value | The new value to set as the key value. |
Fove_ErrorCode fove_createHeadset | ( | Fove_ClientCapabilities | capabilities, |
Fove_Headset ** | outHeadset | ||
) |
Creates and returns an Fove_Headset object, which is the entry point to the entire API.
The result headset should be destroyed using fove_Headset_destroy when no longer needed.
capabilities | The desired capabilities (Gaze, Orientation, Position), for multiple capabilities, use bitwise-or input: Fove_ClientCapabilities::Gaze | Fove_ClientCapabilities::Position |
outHeadset | A pointer where the address of the newly created headset will be written upon success |
Fove_ErrorCode fove_Headset_checkEyesClosed | ( | Fove_Headset * | , |
Fove_Eye * | outEye | ||
) |
Writes out which eyes are closed.
outEye | A pointer to the variable to be written |
Fove_ErrorCode fove_Headset_checkEyesTracked | ( | Fove_Headset * | , |
Fove_Eye * | outEye | ||
) |
Writes out which eyes are being tracked.
outEye | A pointer to the variable to be written |
Fove_ErrorCode fove_Headset_checkSoftwareVersions | ( | Fove_Headset * | ) |
Checks whether the client can run against the installed version of the FOVE SDK.
Fove_ErrorCode fove_Headset_createCompositor | ( | Fove_Headset * | , |
Fove_Compositor ** | outCompositor | ||
) |
Returns a compositor interface from the given headset.
Each call to this function creates a new object. The object should be destroyed with fove_Compositor_destroy It is fine to call this function multiple times with the same headset, the same pointer will be returned. It is ok for the compositor to outlive the headset passed in.
Fove_ErrorCode fove_Headset_createProfile | ( | Fove_Headset * | , |
const char * | newName | ||
) |
Creates a new profile.
The FOVE system keeps a set of profiles so that different users on the same system can store data, such as calibrations, separately. Profiles persist to disk and survive restart. Third party applications can control the profile system and store data within it.
This function creates a new profile, but does not add any data or switch to it.
newName | Null-terminated UTF-8 unique name of the profile to create |
Fove_ErrorCode fove_Headset_deleteProfile | ( | Fove_Headset * | , |
const char * | profileName | ||
) |
Deletes an existing profile.
This function deletes an existing profile.
If the deleted profile is the current profile, then no current profile is set after this returns. In such a case, it is undefined whether any existing profile data loaded into memory may be kept around.
profileName | Null-terminated UTF-8 name of the profile to be deleted |
Fove_ErrorCode fove_Headset_destroy | ( | Fove_Headset * | ) |
Frees resources used by a headset object, including memory and sockets.
Upon return, this headset pointer, and any research headsets from it, should no longer be used.
Fove_ErrorCode fove_Headset_getCurrentProfile | ( | Fove_Headset * | , |
void(*)(const char *callbackProfileName, void *callbackData) | callback, | ||
void * | callbackData | ||
) |
Gets the current profile.
The callback is not invoked if there is no current profile.
callbackProfileName is a non-null, null-terminated UTF-8 string with the name of the current profile.
Invoking any other function on this headset from the callback will yield undefined behavior.
callback | A function pointer to a function that will be called up to onces |
callbackData | An arbitrary pointer passed to the callback or an empty string if no profile is set) |
Fove_ErrorCode fove_Headset_getEyeToHeadMatrices | ( | Fove_Headset * | , |
Fove_Matrix44 * | outLeft, | ||
Fove_Matrix44 * | outRight | ||
) |
Writes out the matrices to convert from eye to head space coordinates.
This is simply a translation matrix that returns +/- IOD/2
outLeft | A pointer to the matrix where left-eye transform data will be written |
outRight | A pointer to the matrix where right-eye transform data will be written |
Fove_ErrorCode fove_Headset_getGazeCastPolicy | ( | Fove_Headset * | , |
Fove_GazeCastPolicy * | policy | ||
) |
Get the current gaze cast policy.
policy | A pointer used to received the current gaze cast policy |
Fove_ErrorCode fove_Headset_getGazeConvergence | ( | Fove_Headset * | , |
Fove_GazeConvergenceData * | outConvergenceData | ||
) |
Writes out eye convergence data.
outConvergenceData | A pointer to the convergence data struct to be written |
Fove_ErrorCode fove_Headset_getGazeVectors | ( | Fove_Headset * | , |
Fove_GazeVector * | outLeft, | ||
Fove_GazeVector * | outRight | ||
) |
Writes out each eye's current gaze vector.
If either argument is nullptr
, only the other value will be written. It is an error for both arguments to be nullptr
.
outLeft | A pointer to the left eye gaze vector which will be written to |
outRight | A pointer to the right eye gaze vector which will be written to |
Fove_ErrorCode fove_Headset_getGazeVectors2D | ( | Fove_Headset * | , |
Fove_Vec2 * | outLeft, | ||
Fove_Vec2 * | outRight | ||
) |
Writes out the user's 2D gaze position on the screens seen through the HMD's lenses.
The use of lenses and distortion correction creates a screen in front of each eye. This function returns 2D vectors representing where on each eye's screen the user is looking. The vectors are normalized in the range [-1, 1] along both X and Y axes such that the following points are true:
Center: (0, 0) Bottom-Left: (-1, -1) Top-Right: (1, 1)
outLeft | A pointer to the left eye gaze point in the HMD's virtual screen space |
outRight | A pointer to the right eye gaze point in the HMD's virtual screen space |
Fove_ErrorCode fove_Headset_getHardwareInfo | ( | Fove_Headset * | , |
Fove_HeadsetHardwareInfo * | outHardwareInfo | ||
) |
Writes out the hardware information.
Allows you to get serial number, manufacturer, and model name of the headset.
Fove_ErrorCode fove_Headset_getLatestPose | ( | Fove_Headset * | , |
Fove_Pose * | outPose | ||
) |
Writes out the pose of the head-mounted display.
outPose | A pointer to the variable to be written |
Fove_ErrorCode fove_Headset_getProfileDataPath | ( | Fove_Headset * | , |
const char * | profileName, | ||
void(*)(const char *callbackProfileName, void *callbackData) | callback, | ||
void * | callbackData | ||
) |
Gets the data folder for a given profile.
Allows you to retrieve a filesytem directory where third party apps can write data associated with this profile. This directory will be created before return.
Since multiple applications may write stuff to a profile, please prefix any files you create with something unique to your application.
There are no special protections on profile data, and it may be accessible to any other app on the system. Do not write sensitive data here.
This is intended for simple uses. For advanced uses that have security concerns, or want to sync to a server, etc, third party applications are encouraged to use their own separate data store keyed by profile name. They will need to test for profile name changes and deletions manually in that case.
Invoking any other function on this headset from the callback will yield undefined behavior.
callbackProfileName is a non-null, null-terminated UTF-8 string with the path.
callback | A function pointer to a function that will be called once if successful. Not invoked in the event of error |
callbackData | An arbitrary pointer passed to the callback |
profileName | A null-terminated UTF-8 string with the name of the profile to be queried, or an empty string if no profile is set |
Fove_ErrorCode fove_Headset_getProjectionMatricesLH | ( | Fove_Headset * | , |
float | zNear, | ||
float | zFar, | ||
Fove_Matrix44 * | outLeftMat, | ||
Fove_Matrix44 * | outRightMat | ||
) |
Writes out the values of passed-in left-handed 4x4 projection matrices.
Writes 4x4 projection matrices for both eyes using near and far planes in a left-handed coordinate system. Either outLeftMat or outRightMat may be nullptr
to only write the other matrix, however setting both to nullptr
is considered invalid and will return Fove_ErrorCode::API_NullOutPointersOnly
.
zNear | The near plane in float, Range: from 0 to zFar |
zFar | The far plane in float, Range: from zNear to infinity |
outLeftMat | A pointer to the matrix you want written |
outRightMat | A pointer to the matrix you want written |
Fove_ErrorCode fove_Headset_getProjectionMatricesRH | ( | Fove_Headset * | , |
float | zNear, | ||
float | zFar, | ||
Fove_Matrix44 * | outLeftMat, | ||
Fove_Matrix44 * | outRightMat | ||
) |
Writes out the values of passed-in right-handed 4x4 projection matrices.
Writes 4x4 projection matrices for both eyes using near and far planes in a right-handed coordinate system. Either outLeftMat or outRightMat may be nullptr
to only write the other matrix, however setting both to nullptr
is considered invalid and will return Fove_ErrorCode::API_NullOutPointersOnly
.
zNear | The near plane in float, Range: from 0 to zFar |
zFar | The far plane in float, Range: from zNear to infinity |
outLeftMat | A pointer to the matrix you want written |
outRightMat | A pointer to the matrix you want written |
Fove_ErrorCode fove_Headset_getRawProjectionValues | ( | Fove_Headset * | , |
Fove_ProjectionParams * | outLeft, | ||
Fove_ProjectionParams * | outRight | ||
) |
Writes out values for the view frustum of the specified eye at 1 unit away.
Writes out values for the view frustum of the specified eye at 1 unit away. Please multiply them by zNear to convert to your correct frustum near-plane. Either outLeft or outRight may be nullptr
to only write the other struct, however setting both to nullptr
is considered and error and the function will return Fove_ErrorCode::API_NullOutPointersOnly
.
outLeft | A pointer to the struct describing the left camera projection parameters |
outRight | A pointer to the struct describing the right camera projection parameters |
Fove_ErrorCode fove_Headset_getRenderIOD | ( | Fove_Headset * | , |
float * | outIOD | ||
) |
Interocular distance to use for rendering in meters.
This is an estimation of the distance between centers of the left and right eyeballs. Half of the IOD can be used to displace the left and right cameras for stereoscopic rendering. We recommend calling this each frame when doing stereoscopic rendering. Future versions of the FOVE service may update the IOD during runtime as needed.
outIOD | A floating point value where the IOD will be written upon exit if there is no error |
Fove_ErrorCode fove_Headset_getResearchHeadset | ( | Fove_Headset * | , |
Fove_ResearchCapabilities | caps, | ||
Fove_ResearchHeadset ** | outHeadset | ||
) |
Converts an existing headset object into a research headset.
It is fine to call this function multiple times with the same headset, the same pointer will be returned. The research API does not provide backwards or forwards compatibility with different FOVE runtime. Do not release general purpose software using this API, this is meant for researcher user in a controlled environment (lab). The result Fove_ResearchHeadset is destroyed when the input headset object is destroyed. There is no destroy/free function for the research headset specifically.
caps | These capabilities are automatically passed to fove_ResearchHeadset_registerCapabilities so as to avoid an extra call |
outHeadset | A pointer where the address of the newly created research headset object will be written upon success |
Fove_ErrorCode fove_Headset_getSoftwareVersions | ( | Fove_Headset * | , |
Fove_Versions * | outSoftwareVersions | ||
) |
Writes out the current software versions.
Allows you to get detailed information about the client and runtime versions. Instead of comparing software versions directly, you should simply call CheckSoftwareVersions
to ensure that the client and runtime are compatible.
Fove_ErrorCode fove_Headset_isEyeTrackingCalibrated | ( | Fove_Headset * | , |
bool * | outEyeTrackingCalibrated | ||
) |
Writes out whether eye tracking has been calibrated.
outEyeTrackingCalibrated | A pointer to the variable to be written |
Fove_ErrorCode fove_Headset_isEyeTrackingCalibrating | ( | Fove_Headset * | , |
bool * | outEyeTrackingCalibrating | ||
) |
Writes out whether eye tracking is in the process of performing a calibration.
outEyeTrackingCalibrating | A pointer to the variable to be written |
Fove_ErrorCode fove_Headset_isEyeTrackingEnabled | ( | Fove_Headset * | , |
bool * | outEyeTrackingEnabled | ||
) |
Writes out whether the eye tracking hardware has started.
outEyeTrackingEnabled | A pointer to the variable to be written |
Fove_ErrorCode fove_Headset_isEyeTrackingReady | ( | Fove_Headset * | , |
bool * | outEyeTrackingReady | ||
) |
Writes out whether eye tracking is actively tracking an eye - or eyes.
This means that hardware is enabled and eye tracking is calibrated when the variable is set to true
.
outEyeTrackingReady | A pointer to the variable to be written |
Fove_ErrorCode fove_Headset_isHardwareConnected | ( | Fove_Headset * | , |
bool * | outHardwareConnected | ||
) |
Writes out whether an HMD is know to be connected or not.
outHardwareConnected | A pointer to the value to be written |
Fove_ErrorCode fove_Headset_isHardwareReady | ( | Fove_Headset * | , |
bool * | outIsReady | ||
) |
Writes out whether the hardware for the requested capabilities has started.
Fove_ErrorCode fove_Headset_isHmdAdjustmentGuiVisible | ( | Fove_Headset * | , |
bool * | outHmdAdjustmentGuiVisible | ||
) |
Writes out whether or not the GUI that asks the user to adjust their headset is being displayed.
outHmdAdjustmentGuiVisible | A pointer to the variable to be written |
Fove_ErrorCode fove_Headset_isMotionReady | ( | Fove_Headset * | , |
bool * | outMotionReady | ||
) |
Writes out whether motion tracking hardware has started.
outMotionReady | A pointer to the variable to be written |
Fove_ErrorCode fove_Headset_isPositionReady | ( | Fove_Headset * | , |
bool * | outPositionReady | ||
) |
Writes out whether position tracking hardware has started and returns whether it was successful.
outPositionReady | A pointer to the variable to be written |
Fove_ErrorCode fove_Headset_isUserPresent | ( | Fove_Headset * | , |
bool * | outUserPresent | ||
) |
Writes out whether the user is wearing the headset or not.
When user is not present Eye tracking values shouldn't be used as invalid.
outUserPresent | A pointer to the variable to be written |
Fove_ErrorCode fove_Headset_listProfiles | ( | Fove_Headset * | , |
void(*)(const char *callbackProfileName, void *callbackData) | callback, | ||
void * | callbackData | ||
) |
Lists all existing profiles.
Invoking any other function on this headset from the callback will yield undefined behavior.
callbackProfileName is a non-null, null-terminated UTF-8 string containing the name of a profile.
callback | A function pointer to a function that will be called once for each profile, in no particular order |
callbackData | An arbitrary pointer passed to the callback |
Fove_ErrorCode fove_Headset_registerCameraObject | ( | Fove_Headset * | , |
const Fove_CameraObject * | camera | ||
) |
Registers an camera in the 3D world.
Registering 3D world objects and camera allows FOVE software to identify which objects are being gazed at. We recommend that clients opt-in to this functionality rather than doing it themselves, as our algorithm may improve over time. Clients of course may do their own detection if they have special needs, such as performance needs, or just want to use their own algorithm.
At least 1 camera needs to be registered for automatic object gaze recognition to work. Use the object group mask of the camera to specify which objects the camera is capturing. The camera view pose determine the gaze raycast direction and position. The camera view pose should include any and all offsets from position tracking. No transforms from the headset are added in automatically.
Connection to the service is not required for object registration, thus you can register your world objects at will and not worry about connection or reconnection status.
camera | A description of the camera. Data is copied and no reference is kept to this memory after return. |
Fove_ErrorCode fove_Headset_registerCapabilities | ( | Fove_Headset * | , |
Fove_ClientCapabilities | caps | ||
) |
Registers a client capability, enabling the required hardware as needed.
Usually you provide the required capabilities at the creation of the headset But you can add and remove capabilities anytime while the object is alive.
caps | A set of capabilities to register. Registering an existing capability is a no-op |
Fove_ErrorCode fove_Headset_registerGazableObject | ( | Fove_Headset * | , |
const Fove_GazableObject * | object | ||
) |
Registers an object in the 3D world.
Registering 3D world objects allows FOVE software to identify which objects are being gazed at. We recommend that clients opt-in to this functionality rather than doing it themselves, as our algorithm may improve over time. Clients of course may do their own detection if they have special needs, such as performance needs, or just want to use their own algorithm.
Use fove_Headset_registerCameraObject to set the pose of the corresponding camera in the 3D world.
Connection to the service is not required for object registration, thus you can register your world objects at will and not worry about connection or reconnection status.
object | A description of the object in the 3D world. Data is copied and no reference is kept to this memory after return. |
Fove_ErrorCode fove_Headset_removeCameraObject | ( | Fove_Headset * | , |
int | cameraId | ||
) |
Removes a previously registered camera from the scene.
cameraId | Id of the camera passed to fove_Headset_registerCameraObject() |
Fove_ErrorCode fove_Headset_removeGazableObject | ( | Fove_Headset * | , |
int | objectId | ||
) |
Removes a previously registered 3D object from the scene.
Because of the asynchronous nature of the FOVE system, this object may still be referenced in future frames for a very short period of time.
objectId | Id of the object passed to fove_Headset_registerGazableObject() |
Fove_ErrorCode fove_Headset_renameProfile | ( | Fove_Headset * | , |
const char * | oldName, | ||
const char * | newName | ||
) |
Renames an existing profile.
This function renames an existing profile. This works on the current profile as well.
oldName | Null-terminated UTF-8 name of the profile to be renamed |
newName | Null-terminated UTF-8 unique new name of the profile |
Fove_ErrorCode fove_Headset_setCurrentProfile | ( | Fove_Headset * | , |
const char * | profileName | ||
) |
Sets the current profile.
When changing profile, the FOVE system will load up data, such as calibration data, if it is available. If loading a profile with no calibration data, whether or not the FOVE system keeps old data loaded into memory is undefined.
Please note that no-ops are OK but you should check for Fove_ErrorCode_Profile_NotAvailable.
profileName | Name of the profile to make current, in UTF-8 |
Fove_ErrorCode fove_Headset_setGazeCastPolicy | ( | Fove_Headset * | , |
Fove_GazeCastPolicy | policy | ||
) |
Set the current gaze cast policy.
policy | The new gaze cast policy |
Fove_ErrorCode fove_Headset_startEyeTrackingCalibration | ( | Fove_Headset * | , |
const Fove_CalibrationOptions * | options | ||
) |
Starts eye tracking calibration.
options | Calibration options, or null to use default options |
Fove_ErrorCode fove_Headset_tareOrientationSensor | ( | Fove_Headset * | ) |
Tares the orientation of the headset.
Fove_ErrorCode fove_Headset_tarePositionSensors | ( | Fove_Headset * | ) |
Tares the position of the headset.
Fove_ErrorCode fove_Headset_tickEyeTrackingCalibration | ( | Fove_Headset * | , |
float | deltaTime, | ||
bool | isVisible, | ||
Fove_CalibrationData * | outCalibrationData | ||
) |
Tick the current calibration process and retrieve data information to render the current calibration state.
deltaTime | The time elapsed since the last rendered frame |
isVisible | Indicate to the calibration system that something is being drawn to the screen. This allows the calibration renderer to take as much time as it wants to display success/failure messages and animate away before the calibration processes is marked as completed by the IsEyeTrackingCalibrating function. |
outCalibrationData | The calibration current state information |
This function is how the client declares to the calibration system that is available to render calibration. The calibration system determines which of the available renderers has the highest priority, and returns to that render the information needed to render calibration via the outTarget parameter. Even while ticking this, you may get no result because either no calibration is running, or a calibration is running but some other higher priority renderer is doing the rendering.
Note that it is perfectly fine not to call this function, in which case the Fove service will automatically render the calibration process for you.
Fove_ErrorCode fove_Headset_unregisterCapabilities | ( | Fove_Headset * | , |
Fove_ClientCapabilities | caps | ||
) |
Unregisters a client capability previously registered.
caps | A set of capabilities to unregister. Unregistering an not-existing capability is a no-op |
Fove_ErrorCode fove_Headset_updateCameraObject | ( | Fove_Headset * | , |
int | cameraId, | ||
const Fove_ObjectPose * | pose | ||
) |
Update the pose of a registered camera.
cameraId | Id of the camera passed to fove_Headset_registerCameraObject() |
pose | the updated pose of the camera |
Fove_ErrorCode fove_Headset_updateGazableObject | ( | Fove_Headset * | , |
int | objectId, | ||
const Fove_ObjectPose * | pose | ||
) |
Update a previously registered 3D object pose.
objectId | Id of the object passed to fove_Headset_registerGazableObject() |
pose | the updated pose of the object |
Fove_ErrorCode fove_Headset_waitForNextEyeFrame | ( | Fove_Headset * | ) |
Waits for next camera frame and associated eye tracking info becomes available.
Allows you to sync your eye tracking loop to the actual eye-camera loop. On each loop, you would first call this blocking function to wait for a new frame and then proceed to consume eye tracking info associated with the frame.
Fove_ErrorCode fove_logText | ( | Fove_LogLevel | level, |
const char * | utf8Text | ||
) |
Writes some text to the FOVE log.
level | What severity level the log will use |
utf8Text | Null-terminated text string in UTF-8 |
Fove_ErrorCode fove_ResearchHeadset_getEyeShapes | ( | Fove_ResearchHeadset * | , |
Fove_EyeShape * | outLeft, | ||
Fove_EyeShape * | outRight | ||
) |
Returns the eye shape of the left and right eyes.
outLeft | Location to write the shape of the left eye |
outRight | Location to write the shape of the right eye |
Fove_ErrorCode fove_ResearchHeadset_getImage | ( | Fove_ResearchHeadset * | , |
Fove_ImageType | type, | ||
Fove_BitmapImage * | outImage | ||
) |
Returns the latest image of the given type.
The image data buffer is invalidated upon the next call to this function with the same image type
Fove_ErrorCode fove_ResearchHeadset_registerCapabilities | ( | Fove_ResearchHeadset * | , |
Fove_ResearchCapabilities | caps | ||
) |
Registers a research capability, enabling the required hardware as needed.
Usually you provide the required capabilities at the creation of the research headset. But you can add and remove capabilities anytime while the object is alive.
caps | A set of capabilities to register. Registering an existing capability is a no-op |
Fove_ErrorCode fove_ResearchHeadset_turnOffPositionTrackingLEDs | ( | Fove_ResearchHeadset * | ) |
Turns off position tracking LEDs all at once at a default intensity.
Fove_ErrorCode fove_ResearchHeadset_turnOnPositionTrackingLEDs | ( | Fove_ResearchHeadset * | ) |
Turns on position tracking LEDs all at once at a default intensity.
Fove_ErrorCode fove_ResearchHeadset_unregisterCapabilities | ( | Fove_ResearchHeadset * | , |
Fove_ResearchCapabilities | caps | ||
) |
Unregisters a research capability previously registered.
caps | A set of capabilities to unregister. Unregistering an not-existing capability is a no-op |