OSVR-Core  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
PluginKit

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. Not intended for direct usage if it can be avoided due to lifetime management and datatypes.
 
 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.
 
 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.Use of these wrappers is optional: they duplicate functionality found in the C API as they are implemented in headers on top of the C API. However, they also provide a much cleaner, low-boilerplate interface for the most common operations.
 

Classes

class  osvr::pluginkit::PluginContext
 C++ wrapper class for the opaque plugin context. More...
 

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. Negative values are defined to mean that strategy is unavailable. 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.
 
#define OSVR_RETURN_SUCCESS   (0)
 The "success" value for an OSVR_ReturnCode.
 
#define OSVR_RETURN_FAILURE   (1)
 The "failure" value for an OSVR_ReturnCode.
 

Detailed Description

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:

Macro Definition Documentation

#define OSVR_DISTORTION_PRIORITY_UNAVAILABLE   (-1)

#include <osvr/Util/RenderingTypesC.h>

The constant to return as an OSVR_DistortionPriority if a given strategy is not available for a surface.

See also
OSVR_DistortionPriority

Definition at line 128 of file RenderingTypesC.h.

Typedef Documentation

typedef uint32_t OSVR_ViewerCount

#include <osvr/Util/RenderingTypesC.h>

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

  • 1) inclusive.

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.

Definition at line 72 of file RenderingTypesC.h.

typedef uint8_t OSVR_EyeCount

#include <osvr/Util/RenderingTypesC.h>

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

  • 1) inclusive, for a given viewer.

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.

Definition at line 92 of file RenderingTypesC.h.

typedef uint32_t OSVR_SurfaceCount

#include <osvr/Util/RenderingTypesC.h>

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

  • 1) inclusive, for a given viewer and eye.

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.)

Definition at line 108 of file RenderingTypesC.h.

typedef int32_t OSVR_DistortionPriority

#include <osvr/Util/RenderingTypesC.h>

The integer type used to indicate relative priorities of a display distortion strategy. Negative values are defined to mean that strategy is unavailable.

See also
OSVR_DISTORTION_PRIORITY_UNAVAILABLE

Definition at line 121 of file RenderingTypesC.h.