1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! Public Rust API for the Enpose 6-DoF tracking system.
//!
//! This API lets external applications discover Enpose tracker devices on
//! the local network ([`DeviceDiscovery`]) and connect to one to receive a
//! live stream of marker poses ([`PoseStream`]).
//!
//! The networking parts are behind the default `net` feature. Building with
//! `default-features = false` keeps only the wire types ([`MarkerPose`]) and
//! the pure [`protocol`] constants, which is what targets without a sockets
//! stack (e.g. `wasm32`) should depend on.
//!
//! # Example
//!
//! ```no_run
//! use enpose_api::{DeviceDiscovery, PoseStream};
//!
//! // Find a device, then stream poses from it.
//! if let Some(device) = DeviceDiscovery::new().discover()?.into_iter().next() {
//! let mut stream = PoseStream::from_device(&device, false)?;
//! // `true` waits for a pose update (up to a 3-second timeout).
//! for pose in stream.receive_pose_updates(true)? {
//! println!("marker {} @ ({}, {}, {})", pose.marker_id, pose.x, pose.y, pose.z);
//! }
//! }
//! # Ok::<(), std::io::Error>(())
//! ```
pub use MarkerPose;
pub use ;
pub use PoseStream;