56 opts->setTracker(ifaceObj->tracker);
60 template <
typename StateType>
61 static inline OSVR_ReturnCode
68 iface, [&]() { iface->tracker->sendReport(*val, sensor, *timestamp); });
71 template <
typename StateType>
72 static inline OSVR_ReturnCode
79 iface->tracker->sendVelReport(*val, sensor, *timestamp);
83 template <
typename StateType>
84 static inline OSVR_ReturnCode
93 iface->tracker->sendAccelReport(*val, sensor, *timestamp);
113 return osvrTrackerSend(
"osvrDeviceTrackerSendPoseTimestamped", dev, iface,
114 val, sensor, timestamp);
134 return osvrTrackerSend(
"osvrDeviceTrackerSendPoseTimestamped", dev, iface,
135 val, sensor, timestamp);
156 return osvrTrackerSend(
"osvrDeviceTrackerSendPoseTimestamped", dev, iface,
157 val, sensor, timestamp);
165 return osvrTrackerSendVel(
"osvrDeviceTrackerSendVelocityTimestamped", dev,
166 iface, val, sensor, timestamp);
175 return osvrTrackerSendVel(
"osvrDeviceTrackerSendLinearVelocityTimestamped",
176 dev, iface, val, sensor, timestamp);
185 return osvrTrackerSendVel(
"osvrDeviceTrackerSendAngularVelocityTimestamped",
186 dev, iface, val, sensor, timestamp);
195 return osvrTrackerSendAccel(
"osvrDeviceTrackerSendAccelerationTimestamped",
196 dev, iface, val, sensor, timestamp);
205 return osvrTrackerSendAccel(
206 "osvrDeviceTrackerSendLinearAccelerationTimestamped", dev, iface, val,
216 return osvrTrackerSendAccel(
217 "osvrDeviceTrackerSendAngularAccelerationTimestamped", dev, iface, val,
OSVR_ReturnCode osvrDeviceTrackerSendOrientationTimestamped(OSVR_DeviceToken dev, OSVR_TrackerDeviceInterface iface, OSVR_OrientationState const *val, OSVR_ChannelCount sensor, OSVR_TimeValue const *timestamp)
Report the orientation of a sensor that doesn't report position, using the supplied timestamp...
Struct for combined acceleration state.
typename FilterType::State StateType
Given a filter type, get the state type.
uint32_t OSVR_ChannelCount
The integer type specifying a number of channels/sensors or a channel/sensor index.
A DeviceToken connects the generic device interaction code in PluginKit's C API with the workings of ...
A structure defining a 3D vector, often a position/translation.
void osvrTimeValueGetNow(OSVR_TimeValue *dest)
Gets the current time in the TimeValue. Parallel to gettimeofday.
A structure defining a quaternion, often a unit quaternion representing 3D rotation.
OSVR_ReturnCode useSendGuardVoid(InterfaceType &iface, F &&func)
OSVR_ReturnCode osvrDeviceTrackerSendPose(OSVR_DeviceToken dev, OSVR_TrackerDeviceInterface iface, OSVR_PoseState const *val, OSVR_ChannelCount sensor)
Report the full rigid body pose of a sensor, automatically generating a timestamp.
The quaternion represents the incremental rotation taking place over a period of dt seconds...
Structure used internally to construct the desired type of device.
#define OSVR_PLUGIN_HANDLE_NULL_CONTEXT(FUNC, CONTEXT_NAME)
Internal macro for use in C API function implementations to check the validity of a context parameter...
OSVR_ReturnCode osvrDeviceTrackerSendAngularAccelerationTimestamped(OSVR_DeviceToken dev, OSVR_TrackerDeviceInterface iface, OSVR_AngularAccelerationState const *val, OSVR_ChannelCount sensor, OSVR_TimeValue const *timestamp)
Report the angular acceleration of a sensor that doesn't report linear acceleration, using the supplied timestamp.
#define OSVR_RETURN_SUCCESS
The "success" value for an OSVR_ReturnCode.
OSVR_ReturnCode osvrDeviceTrackerSendLinearAccelerationTimestamped(OSVR_DeviceToken dev, OSVR_TrackerDeviceInterface iface, OSVR_LinearAccelerationState const *val, OSVR_ChannelCount sensor, OSVR_TimeValue const *timestamp)
Report the linear acceleration of a sensor that doesn't report angular acceleration, using the supplied timestamp.
OSVR_ReturnCode osvrDeviceTrackerSendOrientation(OSVR_DeviceToken dev, OSVR_TrackerDeviceInterface iface, OSVR_OrientationState const *val, OSVR_ChannelCount sensor)
Report the orientation of a sensor that doesn't report position, automatically generating a timestamp...
OSVR_ReturnCode osvrDeviceTrackerSendPosition(OSVR_DeviceToken dev, OSVR_TrackerDeviceInterface iface, OSVR_PositionState const *val, OSVR_ChannelCount sensor)
Report the position of a sensor that doesn't report orientation, automatically generating a timestamp...
OSVR_ReturnCode osvrDeviceTrackerSendPositionTimestamped(OSVR_DeviceToken dev, OSVR_TrackerDeviceInterface iface, OSVR_PositionState const *val, OSVR_ChannelCount sensor, OSVR_TimeValue const *timestamp)
Report the position of a sensor that doesn't report orientation, using the supplied timestamp...
OSVR_ReturnCode osvrDeviceTrackerSendAccelerationTimestamped(OSVR_DeviceToken dev, OSVR_TrackerDeviceInterface iface, OSVR_AccelerationState const *val, OSVR_ChannelCount sensor, OSVR_TimeValue const *timestamp)
Report the linear and angular Acceleration of a sensor, using the supplied timestamp.
A structure defining a 3D (6DOF) rigid body pose: translation and rotation.
OSVR_ReturnCode osvrDeviceTrackerSendPoseTimestamped(OSVR_DeviceToken dev, OSVR_TrackerDeviceInterface iface, OSVR_PoseState const *val, OSVR_ChannelCount sensor, OSVR_TimeValue const *timestamp)
Report the full rigid body pose of a sensor, using the supplied timestamp.
OSVR_ReturnCode osvrDeviceTrackerConfigure(OSVR_DeviceInitOptions opts, OSVR_TrackerDeviceInterface *iface)
Specify that your device will implement the Tracker interface.
Struct for combined velocity state.
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...
OSVR_ReturnCode osvrDeviceTrackerSendAngularVelocityTimestamped(OSVR_DeviceToken dev, OSVR_TrackerDeviceInterface iface, OSVR_AngularVelocityState const *val, OSVR_ChannelCount sensor, OSVR_TimeValue const *timestamp)
Report the angular velocity of a sensor that doesn't report linear velocity, using the supplied times...
Base class for the DeviceInterfaceObjects retrieved by plugins to let them send data on an interface...
OSVR_ReturnCode osvrDeviceTrackerSendLinearVelocityTimestamped(OSVR_DeviceToken dev, OSVR_TrackerDeviceInterface iface, OSVR_LinearVelocityState const *val, OSVR_ChannelCount sensor, OSVR_TimeValue const *timestamp)
Report the linear velocity of a sensor that doesn't report angular velocity, using the supplied times...
OSVR_ReturnCode osvrDeviceTrackerSendVelocityTimestamped(OSVR_DeviceToken dev, OSVR_TrackerDeviceInterface iface, OSVR_VelocityState const *val, OSVR_ChannelCount sensor, OSVR_TimeValue const *timestamp)
Report the linear and angular velocity of a sensor, using the supplied timestamp. ...