pub struct PointerSystem { /* private fields */ }Expand description
Runtime owner for pointer-specific state and lifecycle.
Initial responsibilities:
- ensure each
PointerComponentowns a childRayCastComponent - cache pointer ↔ raycaster relationships
Higher-level pointer behavior (topology classification, trigger policy, etc.) will migrate here incrementally from other systems.
Implementations§
Source§impl PointerSystem
impl PointerSystem
pub fn register_pointer( &mut self, world: &mut World, component: ComponentId, emit: &mut dyn SignalEmitter, )
pub fn remove_pointer(&mut self, component: ComponentId)
pub fn raycast_for_pointer(&self, component: ComponentId) -> Option<ComponentId>
pub fn raycast_to_pointer(&self, raycaster: ComponentId) -> Option<ComponentId>
Source§impl PointerSystem
impl PointerSystem
Sourcepub fn build_activations(
&self,
world: &World,
input: &InputState,
xr: &XrInputState,
) -> PointerActivations
pub fn build_activations( &self, world: &World, input: &InputState, xr: &XrInputState, ) -> PointerActivations
Map each registered pointer to its trigger state this frame.
Desktop pointers use InputState mouse left button. Controller-backed pointers use
XrInputState indexed by hand. A gaze-style pointer beneath CameraXR has no implicit
trigger source and must not consume desktop mouse input merely because it lacks a
ControllerXR ancestor.
Trait Implementations§
Source§impl Debug for PointerSystem
impl Debug for PointerSystem
Source§impl Default for PointerSystem
impl Default for PointerSystem
Source§fn default() -> PointerSystem
fn default() -> PointerSystem
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PointerSystem
impl RefUnwindSafe for PointerSystem
impl Send for PointerSystem
impl Sync for PointerSystem
impl Unpin for PointerSystem
impl UnsafeUnpin for PointerSystem
impl UnwindSafe for PointerSystem
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.