mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
xrt: Add xrt_imu_sink interface
This commit is contained in:
parent
92fc2784e1
commit
00a2f891a2
|
@ -133,6 +133,24 @@ struct xrt_imu_sample
|
||||||
double ax, ay, az, wx, wy, wz;
|
double ax, ay, az, wx, wy, wz;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @interface xrt_imu_sink
|
||||||
|
*
|
||||||
|
* An object that is sent IMU samples.
|
||||||
|
*
|
||||||
|
* Similar to @ref xrt_frame_sink but the interface implementation must manage
|
||||||
|
* its own resources, not through a context graph.
|
||||||
|
*
|
||||||
|
* @todo Make @ref xrt_tracked_psmv and @ref xrt_tracked_psvr implement this
|
||||||
|
*/
|
||||||
|
struct xrt_imu_sink
|
||||||
|
{
|
||||||
|
/*!
|
||||||
|
* Push an IMU sample into the sink
|
||||||
|
*/
|
||||||
|
void (*push_imu)(struct xrt_imu_sink *, struct xrt_imu_sample *sample);
|
||||||
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @interface xrt_tracked_psmv
|
* @interface xrt_tracked_psmv
|
||||||
*
|
*
|
||||||
|
@ -244,6 +262,13 @@ struct xrt_tracked_hand
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//! @public @memberof xrt_imu_sink
|
||||||
|
static inline void
|
||||||
|
xrt_sink_push_imu(struct xrt_imu_sink *sink, struct xrt_imu_sample *sample)
|
||||||
|
{
|
||||||
|
sink->push_imu(sink, sample);
|
||||||
|
}
|
||||||
|
|
||||||
//! @public @memberof xrt_tracked_psmv
|
//! @public @memberof xrt_tracked_psmv
|
||||||
static inline void
|
static inline void
|
||||||
xrt_tracked_psmv_get_tracked_pose(struct xrt_tracked_psmv *psmv,
|
xrt_tracked_psmv_get_tracked_pose(struct xrt_tracked_psmv *psmv,
|
||||||
|
|
Loading…
Reference in a new issue