OSVR-Core
Typedefs | Functions
2D location interface (base C API)

Sending a normalized 2D location from a device in your plugin. More...

Typedefs

typedef struct OSVR_Location2D_DeviceInterfaceObjectOSVR_Location2D_DeviceInterface
 Opaque type used in conjunction with a device token to send data on 2D Location interface.
 

Functions

OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode osvrDeviceLocation2DConfigure (OSVR_INOUT_PTR OSVR_DeviceInitOptions opts, OSVR_OUT_PTR OSVR_Location2D_DeviceInterface *iface, OSVR_IN OSVR_ChannelCount numSensors OSVR_CPP_ONLY(=1)) OSVR_FUNC_NONNULL((1
 Specify that your device will implement the Location2D interface. More...
 
OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode osvrDeviceLocation2DReportData (OSVR_IN_PTR OSVR_Location2D_DeviceInterface iface, OSVR_IN OSVR_Location2DState locationData, 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 a normalized 2D location from a device in your plugin.

Function Documentation

§ osvrDeviceLocation2DConfigure()

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

Specify that your device will implement the Location2D 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 Location2D interface.
numSensorsThe number of sensors you will be reporting 2D Location data: You can report 1+ sensors. This parameter may be subject to external limitations

§ osvrDeviceLocation2DReportData()

OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode osvrDeviceLocation2DReportData ( OSVR_IN_PTR OSVR_Location2D_DeviceInterface  iface,
OSVR_IN OSVR_Location2DState  locationData,
OSVR_IN OSVR_ChannelCount  sensor,
OSVR_IN_PTR OSVR_TimeValue const *  timestamp 
)

Report data for a specific sensor.

Parameters
ifaceLocation2D interface
locationDataCopy of 2D Location data
sensorSensor number
timestampTimestamp correlating to 2D location data.