mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-29 01:48:31 +00:00
xrt: Add pose sink interface
This commit is contained in:
parent
2f31b2e5b0
commit
88bd7a669d
|
@ -145,7 +145,7 @@ struct xrt_imu_sample
|
|||
/*!
|
||||
* @interface xrt_imu_sink
|
||||
*
|
||||
* An object that is sent IMU samples.
|
||||
* An object to send IMU samples to.
|
||||
*
|
||||
* Similar to @ref xrt_frame_sink but the interface implementation must manage
|
||||
* its own resources, not through a context graph.
|
||||
|
@ -160,6 +160,16 @@ struct xrt_imu_sink
|
|||
void (*push_imu)(struct xrt_imu_sink *, struct xrt_imu_sample *sample);
|
||||
};
|
||||
|
||||
/*!
|
||||
* @interface xrt_pose_sink
|
||||
*
|
||||
* An object to send pairs of timestamps and poses to. @see xrt_imu_sink.
|
||||
*/
|
||||
struct xrt_pose_sink
|
||||
{
|
||||
void (*push_pose)(struct xrt_pose_sink *, timepoint_ns ts, struct xrt_pose *pose);
|
||||
};
|
||||
|
||||
/*!
|
||||
* Container of pointers to sinks that could be used for a SLAM system. Sinks
|
||||
* are considered disabled if they are null.
|
||||
|
@ -307,6 +317,13 @@ xrt_sink_push_imu(struct xrt_imu_sink *sink, struct xrt_imu_sample *sample)
|
|||
sink->push_imu(sink, sample);
|
||||
}
|
||||
|
||||
//! @public @memberof xrt_pose_sink
|
||||
static inline void
|
||||
xrt_sink_push_pose(struct xrt_pose_sink *sink, timepoint_ns ts, struct xrt_pose *pose)
|
||||
{
|
||||
sink->push_pose(sink, ts, pose);
|
||||
}
|
||||
|
||||
//! @public @memberof xrt_tracked_psmv
|
||||
static inline void
|
||||
xrt_tracked_psmv_get_tracked_pose(struct xrt_tracked_psmv *psmv,
|
||||
|
|
Loading…
Reference in a new issue