Trait ar_drivers::ARGlasses
source · pub trait ARGlasses: Send {
// Required methods
fn serial(&mut self) -> Result<String, Error>;
fn read_event(&mut self) -> Result<GlassesEvent, Error>;
fn get_display_mode(&mut self) -> Result<DisplayMode, Error>;
fn set_display_mode(
&mut self,
display_mode: DisplayMode
) -> Result<(), Error>;
fn display_fov(&self) -> f32;
fn imu_to_display_matrix(&self, side: Side, ipd: f32) -> Isometry3<f64>;
fn name(&self) -> &'static str;
fn display_delay(&self) -> u64;
// Provided method
fn cameras(&self) -> Result<Vec<CameraDescriptor>, Error> { ... }
}
Expand description
Common interface for AR implemented glasses
Required Methods§
sourcefn read_event(&mut self) -> Result<GlassesEvent, Error>
fn read_event(&mut self) -> Result<GlassesEvent, Error>
Get a single sensor event. Blocks.
sourcefn get_display_mode(&mut self) -> Result<DisplayMode, Error>
fn get_display_mode(&mut self) -> Result<DisplayMode, Error>
Get the display mode of the glasses. See DisplayMode
sourcefn set_display_mode(&mut self, display_mode: DisplayMode) -> Result<(), Error>
fn set_display_mode(&mut self, display_mode: DisplayMode) -> Result<(), Error>
Set the display mode of the glasses. See DisplayMode
sourcefn display_fov(&self) -> f32
fn display_fov(&self) -> f32
Field of view of the display along the horizontal axis, in radians
sourcefn imu_to_display_matrix(&self, side: Side, ipd: f32) -> Isometry3<f64>
fn imu_to_display_matrix(&self, side: Side, ipd: f32) -> Isometry3<f64>
Transformation from IMU frame to display frame, at the specified
IPD (interpupillary distance). The ipd
parameter is in meters.
A typical value is 0.07.
sourcefn display_delay(&self) -> u64
fn display_delay(&self) -> u64
The additional delay (in usecs) of the glasses’ display from getting the data on DisplayPort. This is not really an absolute value, but more of a relative measure between different glasses. In the future this may depend on the current display mode.