#[repr(C)]pub struct XRFrame {
reflector_: Reflector,
session: Dom<XRSession>,
data: Frame,
active: Cell<bool>,
animation_frame: Cell<bool>,
}
Fields
reflector_: Reflector
session: Dom<XRSession>
data: Frame
active: Cell<bool>
animation_frame: Cell<bool>
Implementations
sourceimpl XRFrame
impl XRFrame
fn __assert_parent_type(&self)
sourceimpl XRFrame
impl XRFrame
fn new_inherited(session: &XRSession, data: Frame) -> XRFrame
pub fn new(
global: &GlobalScope,
session: &XRSession,
data: Frame
) -> Root<Dom<XRFrame>>
sourcepub fn set_active(&self, active: bool)
pub fn set_active(&self, active: bool)
https://immersive-web.github.io/webxr/#xrframe-active
sourcepub fn set_animation_frame(&self, animation_frame: bool)
pub fn set_animation_frame(&self, animation_frame: bool)
https://immersive-web.github.io/webxr/#xrframe-animationframe
pub fn get_pose(
&self,
space: &XRSpace
) -> Option<RigidTransform3D<f32, ApiSpace, Native>>
pub fn get_sub_images(&self, layer_id: LayerId) -> Option<&SubImages>
Trait Implementations
sourceimpl DomObjectWrap for XRFrame
impl DomObjectWrap for XRFrame
sourceconst WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::XRFrameBinding::XRFrameBinding::Wrap as for<'a> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::boxed::Box<dom::xrframe::XRFrame>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::xrframe::XRFrame>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::XRFrameBinding::XRFrameBinding::Wrap as for<'a> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::boxed::Box<dom::xrframe::XRFrame>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::xrframe::XRFrame>>}
Function pointer to the general wrap function type
sourceimpl IDLInterface for XRFrame
impl IDLInterface for XRFrame
sourceimpl MallocSizeOf for XRFrame
impl MallocSizeOf for XRFrame
sourcefn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself. Read more
sourceimpl MutDomObject for XRFrame
impl MutDomObject for XRFrame
sourceunsafe fn init_reflector(&self, obj: *mut JSObject)
unsafe fn init_reflector(&self, obj: *mut JSObject)
Initializes the Reflector
sourceimpl ToJSValConvertible for XRFrame
impl ToJSValConvertible for XRFrame
sourceunsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue<'_>)
unsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue<'_>)
Convert
self
to a JSVal
. JSAPI failure causes a panic.sourceimpl XRFrameMethods for XRFrame
impl XRFrameMethods for XRFrame
sourcefn Session(&self) -> Root<Dom<XRSession>>
fn Session(&self) -> Root<Dom<XRSession>>
https://immersive-web.github.io/webxr/#dom-xrframe-session
sourcefn GetViewerPose(
&self,
reference: &XRReferenceSpace
) -> Result<Option<Root<Dom<XRViewerPose>>>, Error>
fn GetViewerPose(
&self,
reference: &XRReferenceSpace
) -> Result<Option<Root<Dom<XRViewerPose>>>, Error>
https://immersive-web.github.io/webxr/#dom-xrframe-getviewerpose
sourcefn GetPose(
&self,
space: &XRSpace,
relative_to: &XRSpace
) -> Result<Option<Root<Dom<XRPose>>>, Error>
fn GetPose(
&self,
space: &XRSpace,
relative_to: &XRSpace
) -> Result<Option<Root<Dom<XRPose>>>, Error>
https://immersive-web.github.io/webxr/#dom-xrframe-getpose
sourcefn GetJointPose(
&self,
space: &XRJointSpace,
relative_to: &XRSpace
) -> Result<Option<Root<Dom<XRJointPose>>>, Error>
fn GetJointPose(
&self,
space: &XRJointSpace,
relative_to: &XRSpace
) -> Result<Option<Root<Dom<XRJointPose>>>, Error>
https://immersive-web.github.io/webxr/#dom-xrframe-getpose
sourcefn GetHitTestResults(
&self,
source: &XRHitTestSource
) -> Vec<Root<Dom<XRHitTestResult>>> ⓘ
fn GetHitTestResults(
&self,
source: &XRHitTestSource
) -> Vec<Root<Dom<XRHitTestResult>>> ⓘ
https://immersive-web.github.io/hit-test/#dom-xrframe-gethittestresults
Auto Trait Implementations
impl !RefUnwindSafe for XRFrame
impl !Send for XRFrame
impl !Sync for XRFrame
impl Unpin for XRFrame
impl !UnwindSafe for XRFrame
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> MaybeBoxed<Box<T, Global>> for T
impl<T> MaybeBoxed<Box<T, Global>> for T
sourcefn maybe_boxed(self) -> Box<T, Global>
fn maybe_boxed(self) -> Box<T, Global>
Convert
sourceimpl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
sourcefn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert