OSVR-Core
Typedefs | Functions
3D direction interface (base C API)

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

Typedefs

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

Functions

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

Detailed Description

Sending 3D direction from a device in your plugin.

Function Documentation

§ osvrDeviceDirectionConfigure()

OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode osvrDeviceDirectionConfigure ( OSVR_INOUT_PTR OSVR_DeviceInitOptions  opts,
OSVR_OUT_PTR OSVR_DirectionDeviceInterface iface,
OSVR_IN OSVR_ChannelCount numSensors   OSVR_CPP_ONLY=1 
)

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.

§ osvrDeviceDirectionReportData()

OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode osvrDeviceDirectionReportData ( OSVR_IN_PTR OSVR_DirectionDeviceInterface  iface,
OSVR_IN OSVR_DirectionState  directionData,
OSVR_IN OSVR_ChannelCount  sensor,
OSVR_IN_PTR OSVR_TimeValue const *  timestamp 
)

Report data for a specific sensor.

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