OSVR-Core
|
Sends notifications that skeleton reports (aka tracker reports) are complete. More...
Typedefs | |
typedef struct OSVR_SkeletonDeviceInterfaceObject * | OSVR_SkeletonDeviceInterface |
Opaque type used in conjunction with a device token to send data on Skeleton Interface. | |
Functions | |
OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode | osvrDeviceSkeletonConfigure (OSVR_INOUT_PTR OSVR_DeviceInitOptions opts, OSVR_OUT_PTR OSVR_SkeletonDeviceInterface *iface, OSVR_IN_READS(len) const char *jsonDescriptor) OSVR_FUNC_NONNULL((1 |
Specify that your device will implement the Skeleton interface. More... | |
OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode | osvrDeviceSkeletonComplete (OSVR_IN_PTR OSVR_SkeletonDeviceInterface iface, OSVR_IN OSVR_ChannelCount sensor, OSVR_IN_PTR OSVR_TimeValue const *timestamp) OSVR_FUNC_NONNULL((1 |
Report that transmission of tracker reports for given skeleton sensor is complete. More... | |
OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode | osvrDeviceSkeletonUpdateSpec (OSVR_IN_PTR OSVR_SkeletonDeviceInterface iface, OSVR_IN_READS(len) const char *spec) OSVR_FUNC_NONNULL((1 |
If device detects another skeleton and/or change in existing articulation specification, then it needs to update the spec with the client as well. More... | |
Sends notifications that skeleton reports (aka tracker reports) are complete.
Skeleton interface is implemented as a device that exposes a tracker interface for each skeleton element. For each element, a separate tracker report will be sent with an updated pose followed by skeletonComplete. and the client can request a complete report of entire skeleton (all reported elements), as well as subsets. Note that since it exposes a device via multiple interfaces, you will need to "configure" both interfaces (Tracker and Skeleton).
OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode osvrDeviceSkeletonComplete | ( | OSVR_IN_PTR OSVR_SkeletonDeviceInterface | iface, |
OSVR_IN OSVR_ChannelCount | sensor, | ||
OSVR_IN_PTR OSVR_TimeValue const * | timestamp | ||
) |
Report that transmission of tracker reports for given skeleton sensor is complete.
This method should be called after device reports updated poses for skeleton elements for given skeleton sensor. For example, if device is reporting two hands (two skeleton sensors), it should report all poses for left hand followed by osvrDeviceSkeletonComplete(leftSensor) call and then report all poses for right hand followed by osvrDeviceSkeletonComplete(rightSensor). This ensures that client receives consistent, single-frame reports and avoids bone stretching.
dev | Device token |
iface | Skeleton Interface |
sensor | Sensor number |
timestamp | The same timestamp as for your tracker reports |
OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode osvrDeviceSkeletonConfigure | ( | OSVR_INOUT_PTR OSVR_DeviceInitOptions | opts, |
OSVR_OUT_PTR OSVR_SkeletonDeviceInterface * | iface, | ||
OSVR_IN_READS(len) const char * | jsonDescriptor | ||
) |
Specify that your device will implement the Skeleton interface.
opts | The device init options object. | |
[out] | iface | An interface object you should retain with the same lifetime as the device token in order to send messages conforming to a Skeleton interface. |
jsonDescriptor | A device descriptor json that contains skeleton spec Note that the number of skeleton sensors is not the same as number of skeleton elements. For example if plugin device reports two hands that will be 2 separate skeleton sensors because hands are not connected via common parent. If device can report an entire skeleton then it should only report one sensor. |
OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode osvrDeviceSkeletonUpdateSpec | ( | OSVR_IN_PTR OSVR_SkeletonDeviceInterface | iface, |
OSVR_IN_READS(len) const char * | spec | ||
) |
If device detects another skeleton and/or change in existing articulation specification, then it needs to update the spec with the client as well.
During the skeleton interface initialization this is performed once using the spec provided in the device descriptor. This should be used for unbounded skeletons where the articulation spec may change over time. Devices with bounded skeletons don't need to use this method because the articulation spec remains the same throughout plugin runtime
dev | Device token |
iface | Skeleton Interface |
spec | Updated/New Skeleton Articulation Spec in JSON format |
timestamp | The same timestamp as for your tracker reports |