Struct webxr::headless::HeadlessDevice

source ·
struct HeadlessDevice {
    data: Arc<Mutex<HeadlessDeviceData>>,
    id: u32,
    hit_tests: HitTestList,
    granted_features: Vec<String>,
    grand_manager: LayerGrandManager<SurfmanGL>,
    layer_manager: Option<LayerManager>,
}

Fields§

§data: Arc<Mutex<HeadlessDeviceData>>§id: u32§hit_tests: HitTestList§granted_features: Vec<String>§grand_manager: LayerGrandManager<SurfmanGL>§layer_manager: Option<LayerManager>

Implementations§

source§

impl HeadlessDevice

source

fn with_per_session<R>(&self, f: impl FnOnce(&mut PerSessionData) -> R) -> R

source

fn layer_manager(&mut self) -> Result<&mut LayerManager, Error>

Trait Implementations§

source§

impl DeviceAPI for HeadlessDevice

source§

fn floor_transform(&self) -> Option<RigidTransform3D<f32, Native, Floor>>

The transform from native coordinates to the floor.
source§

fn viewports(&self) -> Viewports

source§

fn create_layer( &mut self, context_id: ContextId, init: LayerInit, ) -> Result<LayerId, Error>

Create a new layer
source§

fn destroy_layer(&mut self, context_id: ContextId, layer_id: LayerId)

Destroy a layer
source§

fn begin_animation_frame( &mut self, layers: &[(ContextId, LayerId)], ) -> Option<Frame>

Begin an animation frame.
source§

fn end_animation_frame(&mut self, layers: &[(ContextId, LayerId)])

End an animation frame, render the layer to the device, and block waiting for the next frame.
source§

fn initial_inputs(&self) -> Vec<InputSource>

Inputs registered with the device on initialization. More may be added, which should be communicated through a yet-undecided event mechanism
source§

fn set_event_dest(&mut self, dest: Sender<Event>)

Sets the event handling channel
source§

fn quit(&mut self)

Quit the session
source§

fn set_quitter(&mut self, quitter: Quitter)

source§

fn update_clip_planes(&mut self, near: f32, far: f32)

source§

fn granted_features(&self) -> &[String]

source§

fn request_hit_test(&mut self, source: HitTestSource)

source§

fn cancel_hit_test(&mut self, id: HitTestId)

source§

fn reference_space_bounds(&self) -> Option<Vec<Point2D<f32, Floor>>>

source§

fn environment_blend_mode(&self) -> EnvironmentBlendMode

source§

fn update_frame_rate(&mut self, rate: f32) -> f32

source§

fn supported_frame_rates(&self) -> Vec<f32>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.