OSVR Framework (Internal Development Docs)  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
2D location interface (base C API)

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

Typedefs

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

Functions

OSVR_ReturnCode osvrDeviceLocation2DConfigure (OSVR_DeviceInitOptions opts, OSVR_Location2D_DeviceInterface *iface, OSVR_ChannelCount numSensors=1)
 Specify that your device will implement the Location2D interface. More...
 
OSVR_ReturnCode osvrDeviceLocation2DReportData (OSVR_Location2D_DeviceInterface iface, OSVR_Location2DState locationData, OSVR_ChannelCount sensor, OSVR_TimeValue const *timestamp)
 Report data for a specific sensor. More...
 

Detailed Description

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

Function Documentation

OSVR_ReturnCode osvrDeviceLocation2DConfigure ( OSVR_DeviceInitOptions  opts,
OSVR_Location2D_DeviceInterface iface,
OSVR_ChannelCount  numSensors = 1 
)

#include <osvr/PluginKit/Location2DInterfaceC.h>

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

Definition at line 47 of file Location2DInterfaceC.cpp.

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

#include <osvr/PluginKit/Location2DInterfaceC.h>

Report data for a specific sensor.

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

Definition at line 63 of file Location2DInterfaceC.cpp.