Struct bevy_trackball::TrackballEvent
source · pub struct TrackballEvent {
pub group: Entity,
pub delta: Delta<f32>,
pub setup: Option<TrackballSetup>,
}
Expand description
Event sent from TrackballController
component to group of TrackballCamera
components.
Fields§
§group: Entity
Entity of TrackballController
component which sent this event.
Read by group of TrackballCamera
components which knows about this entity.
delta: Delta<f32>
Delta transform from initial to final Frame
of TrackballCamera
.
setup: Option<TrackballSetup>
Setup of TrackballCamera
.
Implementations§
source§impl TrackballEvent
impl TrackballEvent
sourcepub const fn first(
group: Entity,
pitch: f32,
yaw: f32,
yaw_axis: Unit<Vector3<f32>>,
) -> Self
pub const fn first( group: Entity, pitch: f32, yaw: f32, yaw_axis: Unit<Vector3<f32>>, ) -> Self
Creates Delta::First
event for camera group
.
sourcepub const fn track(group: Entity, vec: Vector3<f32>) -> Self
pub const fn track(group: Entity, vec: Vector3<f32>) -> Self
Creates Delta::Track
event for camera group
.
sourcepub const fn orbit(
group: Entity,
rot: UnitQuaternion<f32>,
pos: Point3<f32>,
) -> Self
pub const fn orbit( group: Entity, rot: UnitQuaternion<f32>, pos: Point3<f32>, ) -> Self
Creates Delta::Orbit
event for camera group
.
sourcepub const fn slide(group: Entity, vec: Vector3<f32>) -> Self
pub const fn slide(group: Entity, vec: Vector3<f32>) -> Self
Creates Delta::Slide
event for camera group
.
sourcepub const fn scale(group: Entity, rat: f32, pos: Point3<f32>) -> Self
pub const fn scale(group: Entity, rat: f32, pos: Point3<f32>) -> Self
Creates Delta::Scale
event for camera group
.
sourcepub const fn reset(group: Entity) -> Self
pub const fn reset(group: Entity) -> Self
Creates TrackballSetup::Reset
event for camera group
.
Trait Implementations§
source§impl Component for TrackballEvent
impl Component for TrackballEvent
source§const STORAGE_TYPE: StorageType = bevy::ecs::component::StorageType::SparseSet
const STORAGE_TYPE: StorageType = bevy::ecs::component::StorageType::SparseSet
A constant indicating the storage type used for this component.
source§fn register_component_hooks(_hooks: &mut ComponentHooks)
fn register_component_hooks(_hooks: &mut ComponentHooks)
Called when registering this component, allowing mutable access to its
ComponentHooks
.impl Event for TrackballEvent
Auto Trait Implementations§
impl Freeze for TrackballEvent
impl RefUnwindSafe for TrackballEvent
impl Send for TrackballEvent
impl Sync for TrackballEvent
impl Unpin for TrackballEvent
impl UnwindSafe for TrackballEvent
Blanket Implementations§
source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
Return the
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.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<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere
C: Component,
fn component_ids( components: &mut Components, storages: &mut Storages, ids: &mut impl FnMut(ComponentId), )
unsafe fn from_components<T, F>(ctx: &mut T, func: &mut F) -> C
source§fn get_component_ids(
components: &Components,
ids: &mut impl FnMut(Option<ComponentId>),
)
fn get_component_ids( components: &Components, ids: &mut impl FnMut(Option<ComponentId>), )
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.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<C> DynamicBundle for Cwhere
C: Component,
impl<C> DynamicBundle for Cwhere
C: Component,
fn get_components(self, func: &mut impl FnMut(StorageType, OwningPtr<'_>))
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.