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§

source

fn serial(&mut self) -> Result<String, Error>

Get the serial number of the glasses

source

fn read_event(&mut self) -> Result<GlassesEvent, Error>

Get a single sensor event. Blocks.

source

fn get_display_mode(&mut self) -> Result<DisplayMode, Error>

Get the display mode of the glasses. See DisplayMode

source

fn set_display_mode(&mut self, display_mode: DisplayMode) -> Result<(), Error>

Set the display mode of the glasses. See DisplayMode

source

fn display_fov(&self) -> f32

Field of view of the display along the horizontal axis, in radians

source

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.

source

fn name(&self) -> &'static str

Name of the device

source

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.

Provided Methods§

source

fn cameras(&self) -> Result<Vec<CameraDescriptor>, Error>

Get built-in camera descriptors

Implementors§