Enum ar_drivers::GlassesEvent
source · pub enum GlassesEvent {
AccGyro {
accelerometer: Vector3<f32>,
gyroscope: Vector3<f32>,
timestamp: u64,
},
Magnetometer {
magnetometer: Vector3<f32>,
timestamp: u64,
},
KeyPress(u8),
ProximityNear,
ProximityFar,
AmbientLight(u16),
VSync,
}
Expand description
AR glasses sensor event, got from ARGlasses::read_event
Coordinate system is “RUB”: Positive X is Right, Positive Y is Up, Positive Z is backwards. This is the same as the Android sensor coordinate system.
Variants§
AccGyro
Fields
accelerometer: Vector3<f32>
Accelerometer data in m^2/s.
Remember that while gravitational acceleration is “down”, the acceleration the device “feels” is the one opposite from that, so the normal reading when the device is upright is (0, 9.81, 0)
Synchronized accelerometer and gyroscope data.
Magnetometer
Fields
Magnetometer data.
KeyPress(u8)
A key was pressed (sent once per press) The number is a key ID, starting from 0.
ProximityNear
Proximity sensor senses the user, i.e. the glasses were put on Sent once per event.
ProximityFar
Proximity sensor senses the user, i.e. the glasses were taken off. Sent once per event.
AmbientLight(u16)
Ambient light level. Unit is vendor-specific
VSync
V-sync happened on the device
Trait Implementations§
source§impl Clone for GlassesEvent
impl Clone for GlassesEvent
source§fn clone(&self) -> GlassesEvent
fn clone(&self) -> GlassesEvent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for GlassesEvent
impl Send for GlassesEvent
impl Sync for GlassesEvent
impl Unpin for GlassesEvent
impl UnwindSafe for GlassesEvent
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.