OSVR-Core
|
The PluginKit library exposes a C API, with header-only C++ wrappers, to write plugins for the framework. More...
Modules | |
Analysis plugin functionality (base C API) | |
How to create an "analysis filter/plugin". | |
Analog channel interface (base C API) | |
Sending analog reports from a device in your plugin. | |
Button channel interface (base C API) | |
Sending button reports from a device in your plugin. | |
Device-related functionality (C++ wrappers) | |
How to create and report from a device in your plugin. | |
Device-related functionality (base C API) | |
How to create and report from a device in your plugin. | |
3D direction interface (base C API) | |
Sending 3D direction from a device in your plugin. | |
Eye tracker interface (base C API) | |
Sending eye tracker reports from a device in your plugin. | |
Imaging interface (C++) | |
Sending image reports from a device in your plugin. | |
Imaging interface (underlying C API) | |
Used by the C++ header-only wrappers to send image reports from a device in your plugin. | |
2D location interface (base C API) | |
Sending a normalized 2D location from a device in your plugin. | |
Locomotion interface (base C API) | |
Sending locomotion reports from a device in your plugin. | |
Plugin Registration (C++ wrappers) | |
How to start writing a plugin and advertise your capabilities to the core library. | |
Plugin Registration (base C API) | |
How to start writing a plugin and advertise your capabilities to the core library. | |
Skeleton interface (base C API) | |
Sends notifications that skeleton reports (aka tracker reports) are complete. | |
Tracker interface (base C API) | |
Sending tracker reports from a device in your plugin. | |
Namespaces | |
osvr::pluginkit | |
Contains C++ header-only wrappers for the PluginKit C API. | |
Macros | |
#define | OSVR_DISTORTION_PRIORITY_UNAVAILABLE (-1) |
The constant to return as an OSVR_DistortionPriority if a given strategy is not available for a surface. More... | |
Typedefs | |
typedef uint32_t | OSVR_ChannelCount |
The integer type specifying a number of channels/sensors or a channel/sensor index. | |
typedef OSVR_ReturnCode(* | OSVR_DeviceUpdateCallback) (void *userData) |
Function type of a Device Update callback. | |
typedef void(* | OSVR_PluginDataDeleteCallback) (void *pluginData) |
Function type of a Plugin Data Delete callback. | |
typedef OSVR_ReturnCode(* | OSVR_HardwareDetectCallback) (OSVR_PluginRegContext ctx, void *userData) |
Function type of a Hardware Detect callback. | |
typedef OSVR_ReturnCode(* | OSVR_DriverInstantiationCallback) (OSVR_PluginRegContext ctx, const char *params, void *userData) |
Function type of a driver instantiation callback. | |
typedef uint8_t | OSVR_DisplayInputCount |
A count or index for a display input in a display config. | |
typedef int32_t | OSVR_DisplayDimension |
The integer type used in specification of size or location of a display input, in pixels. | |
typedef uint32_t | OSVR_ViewerCount |
The integer type specifying a number of viewers in a system. More... | |
typedef uint8_t | OSVR_EyeCount |
The integer type specifying the number of eyes (viewpoints) of a viewer. More... | |
typedef uint32_t | OSVR_SurfaceCount |
The integer type specifying the number of surfaces seen by a viewer's eye. More... | |
typedef int32_t | OSVR_ViewportDimension |
The integer type used in specification of size or location of a viewport. | |
typedef int32_t | OSVR_DistortionPriority |
The integer type used to indicate relative priorities of a display distortion strategy. More... | |
Variables | |
OSVR_EXTERN_C_BEGIN typedef void * | OSVR_PluginRegContext |
A context pointer passed in to your plugin's entry point and other locations of control flow transfer into our plugin. | |
Return Codes | |
typedef | OSVR_RETURN_SUCCESS_CONDITION (return==OSVR_RETURN_SUCCESS) char OSVR_ReturnCode |
Return type from C API OSVR functions. More... | |
#define | OSVR_RETURN_SUCCESS (0) |
The "success" value for an OSVR_ReturnCode. | |
#define | OSVR_RETURN_FAILURE (1) |
The "failure" value for an OSVR_ReturnCode. | |
The PluginKit library exposes a C API, with header-only C++ wrappers, to write plugins for the framework.
All core functionality that can be accessed through the C++ API is possible to access through the C API as well. However, the C++ wrappers improve the usability of the interface and provide a safer development style. They can also greatly simplify your code and reduce the amount of "boilerplate" needed.
The C++ wrappers do require some version of the Boost headers to be available. For Windows, the official binaries are recommended.
See examples:
#define OSVR_DISTORTION_PRIORITY_UNAVAILABLE (-1) |
The constant to return as an OSVR_DistortionPriority if a given strategy is not available for a surface.
typedef int32_t OSVR_DistortionPriority |
The integer type used to indicate relative priorities of a display distortion strategy.
Negative values are defined to mean that strategy is unavailable.
typedef uint8_t OSVR_EyeCount |
The integer type specifying the number of eyes (viewpoints) of a viewer.
The count for a given viewer is output from osvrClientGetNumEyesForViewer().
When used as an ID/index, it is zero-based,so values range from 0 to (count
Use as an ID/index is not meaningful except in conjunction with the ID of the corresponding viewer. (that is, there is no overall "eye 0", but "viewer 0, eye 0" is meaningful.)
In practice, the most frequent counts are 1 (e.g. mono) and 2 (e.g. stereo), and for example the latter results in eyes with ID 0 and 1 for the viewer. There is no innate or consistent semantics/meaning ("left" or "right") to indices guaranteed at this time, and applications should not try to infer any.
typedef uint32_t OSVR_SurfaceCount |
The integer type specifying the number of surfaces seen by a viewer's eye.
The count for a given viewer and eye is output from osvrClientGetNumSurfacesForViewerEye(). Note that the count is not necessarily equal between eyes of a viewer.
When used as an ID/index, it is zero-based, so values range from 0 to (count
Use as an ID/index is not meaningful except in conjunction with the IDs of the corresponding viewer and eye. (that is, there is no overall "surface 0", but "viewer 0, eye 0, surface 0" is meaningful.)
typedef uint32_t OSVR_ViewerCount |
The integer type specifying a number of viewers in a system.
A "head" is a viewer (though not all viewers are necessarily heads).
The count is output from osvrClientGetNumViewers().
When used as an ID/index, it is zero-based, so values range from 0 to (count
The most frequent count is 1, though higher values are theoretically possible. If you do not handle higher values, do still check and alert the user if their system reports a higher number, as your application may not behave as the user expects.
typedef OSVR_RETURN_SUCCESS_CONDITION | ( | return | = =OSVR_RETURN_SUCCESS | ) |
Return type from C API OSVR functions.