OSVR-Core  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
3D direction interface (base C API)

Sending 3D direction from a device in your plugin. More...

Typedefs

typedef struct
OSVR_DirectionDeviceInterfaceObject * 
OSVR_DirectionDeviceInterface
 Opaque type used in conjunction with a device token to send data on 3D Direction interface.
 

Functions

OSVR_ReturnCode osvrDeviceDirectionConfigure (OSVR_DeviceInitOptions opts, OSVR_DirectionDeviceInterface *iface, OSVR_ChannelCount numSensors=1)
 Specify that your device will implement the Direction interface. More...
 
OSVR_ReturnCode osvrDeviceDirectionReportData (OSVR_DirectionDeviceInterface iface, OSVR_DirectionState directionData, OSVR_ChannelCount sensor, OSVR_TimeValue const *timestamp)
 Report data for a specific sensor. More...
 

Detailed Description

Sending 3D direction from a device in your plugin.

Function Documentation

OSVR_ReturnCode osvrDeviceDirectionConfigure ( OSVR_DeviceInitOptions  opts,
OSVR_DirectionDeviceInterface iface,
OSVR_ChannelCount  numSensors = 1 
)

#include <osvr/PluginKit/DirectionInterfaceC.h>

Specify that your device will implement the Direction interface.

Parameters
optsThe device init options object.
[out]ifaceAn interface object you should retain with the same lifetime as the device token in order to send messages conforming to an Direction interface.
numSensorsThe number of sensors you will be reporting Direction data for. You can report 1+ sensors. This parameter may be subject to external limitations.
OSVR_ReturnCode osvrDeviceDirectionReportData ( OSVR_DirectionDeviceInterface  iface,
OSVR_DirectionState  directionData,
OSVR_ChannelCount  sensor,
OSVR_TimeValue const *  timestamp 
)

#include <osvr/PluginKit/DirectionInterfaceC.h>

Report data for a specific sensor.

Parameters
ifaceDirection interface
directionDataCopy of 3D Direction data
sensorSensor number
timestampTimestamp correlating to 3D direction data.