pub struct InputMethod { /* private fields */ }Expand description
Node representing a spatial input device
Implementations§
Source§impl InputMethod
impl InputMethod
pub fn create( spatial_parent: &impl SpatialRefAspect, transform: Transform, input_type: InputDataType, datamap: &Datamap, ) -> NodeResult<Self>
Source§impl InputMethod
impl InputMethod
pub fn as_input_method_ref(self) -> InputMethodRef
pub fn as_spatial_ref(self) -> SpatialRef
pub fn as_spatial(self) -> Spatial
Trait Implementations§
Source§impl Clone for InputMethod
impl Clone for InputMethod
Source§fn clone(&self) -> InputMethod
fn clone(&self) -> InputMethod
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InputMethod
impl Debug for InputMethod
Source§impl Hash for InputMethod
impl Hash for InputMethod
Source§impl InputMethodAspect for InputMethod
impl InputMethodAspect for InputMethod
fn recv_input_method_event(&self) -> Option<InputMethodEvent>
Source§fn set_input(&self, input: InputDataType) -> NodeResult<()>
fn set_input(&self, input: InputDataType) -> NodeResult<()>
Set the spatial input component of this input method. You must keep the same input data type throughout the entire thing.
Source§fn set_datamap(&self, datamap: &Datamap) -> NodeResult<()>
fn set_datamap(&self, datamap: &Datamap) -> NodeResult<()>
Set the datamap of this input method
Source§fn set_handler_order(&self, handlers: &[InputHandler]) -> NodeResult<()>
fn set_handler_order(&self, handlers: &[InputHandler]) -> NodeResult<()>
Set the order of handlers to propagate input to.
Source§fn set_captures(&self, handlers: &[InputHandler]) -> NodeResult<()>
fn set_captures(&self, handlers: &[InputHandler]) -> NodeResult<()>
Set which handlers are captured.
Source§impl InputMethodRefAspect for InputMethod
impl InputMethodRefAspect for InputMethod
Source§fn try_capture(&self, handler: &impl InputHandlerAspect) -> NodeResult<()>
fn try_capture(&self, handler: &impl InputHandlerAspect) -> NodeResult<()>
Try to capture the input method with the given handler. When the handler does not get input from the method, it will be released.
Source§fn release(&self, handler: &impl InputHandlerAspect) -> NodeResult<()>
fn release(&self, handler: &impl InputHandlerAspect) -> NodeResult<()>
If captured by this handler, release it (e.g. the object is let go of after grabbing).
Source§impl NodeType for InputMethod
impl NodeType for InputMethod
Source§impl OwnedAspect for InputMethod
impl OwnedAspect for InputMethod
Source§fn set_enabled(&self, enabled: bool) -> NodeResult<()>
fn set_enabled(&self, enabled: bool) -> NodeResult<()>
Set if this node is enabled or not. Disabled drawables won’t render, input handlers won’t receive input, etc.
Source§fn destroy(&self) -> NodeResult<()>
fn destroy(&self) -> NodeResult<()>
Destroy this node immediately. Not all nodes will have this method, those that don’t can be dropped client-side without issue.
Source§impl PartialEq for InputMethod
impl PartialEq for InputMethod
Source§impl Serialize for InputMethod
impl Serialize for InputMethod
Source§impl SpatialAspect for InputMethod
impl SpatialAspect for InputMethod
Source§fn set_local_transform(&self, transform: Transform) -> NodeResult<()>
fn set_local_transform(&self, transform: Transform) -> NodeResult<()>
Set the transform of this spatial relative to its spatial parent.
Source§fn set_relative_transform(
&self,
relative_to: &impl SpatialRefAspect,
transform: Transform,
) -> NodeResult<()>
fn set_relative_transform( &self, relative_to: &impl SpatialRefAspect, transform: Transform, ) -> NodeResult<()>
Set the transform of this spatial relative to another node.
Source§fn set_spatial_parent(&self, parent: &impl SpatialRefAspect) -> NodeResult<()>
fn set_spatial_parent(&self, parent: &impl SpatialRefAspect) -> NodeResult<()>
Set the spatial parent with its local transform remaining the same.
It will silently error and not set the spatial parent if it is to a child of itself.
Source§fn set_spatial_parent_in_place(
&self,
parent: &impl SpatialRefAspect,
) -> NodeResult<()>
fn set_spatial_parent_in_place( &self, parent: &impl SpatialRefAspect, ) -> NodeResult<()>
Set the spatial parent with its “global” transform remaining the same.
It will silently error and not set the spatial parent if it is to a child of itself.
Source§fn set_zoneable(&self, zoneable: bool) -> NodeResult<()>
fn set_zoneable(&self, zoneable: bool) -> NodeResult<()>
Set if this spatial is zoneable or not.
You may want to set this to false when being grabbed or interacted with, then back to true when it’s floating inert in space.
Source§async fn export_spatial(&self) -> NodeResult<u64>
async fn export_spatial(&self) -> NodeResult<u64>
Return a UUID representing this node’s SpatialRef that you can send to other clients
Source§impl SpatialRefAspect for InputMethod
impl SpatialRefAspect for InputMethod
Source§async fn get_local_bounding_box(&self) -> NodeResult<BoundingBox>
async fn get_local_bounding_box(&self) -> NodeResult<BoundingBox>
Get the bounding box of this spatial and its children relative to another spatial
Source§async fn get_relative_bounding_box(
&self,
relative_to: &impl SpatialRefAspect,
) -> NodeResult<BoundingBox>
async fn get_relative_bounding_box( &self, relative_to: &impl SpatialRefAspect, ) -> NodeResult<BoundingBox>
Get the bounding box of this spatial and its children relative to itself
Source§async fn get_transform(
&self,
relative_to: &impl SpatialRefAspect,
) -> NodeResult<Transform>
async fn get_transform( &self, relative_to: &impl SpatialRefAspect, ) -> NodeResult<Transform>
Get the transform relative to some other spatial node.
impl Eq for InputMethod
Auto Trait Implementations§
impl Freeze for InputMethod
impl !RefUnwindSafe for InputMethod
impl Send for InputMethod
impl Sync for InputMethod
impl Unpin for InputMethod
impl !UnwindSafe for InputMethod
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
Mutably borrows from an owned value. Read more