pub enum PhysicsEvent {
Impact {
event_id: EventId,
source: EntityId,
target: EntityId,
position: [f32; 3],
normal: [f32; 3],
force: f32,
seed: u64,
},
Fracture {
event_id: EventId,
entity: EntityId,
fracture_class: String,
position: [f32; 3],
impulse: [f32; 3],
seed: u64,
},
Ignite {
event_id: EventId,
entity: EntityId,
heat: f32,
seed: u64,
},
Explode {
event_id: EventId,
position: [f32; 3],
radius: f32,
force: f32,
seed: u64,
},
PromoteParticle {
event_id: EventId,
emitter_id: u64,
particle_index: u32,
target: PromotionTarget,
},
SpawnEmitter {
event_id: EventId,
preset_id: String,
position: [f32; 3],
seed: u64,
},
StopEmitter {
event_id: EventId,
emitter_id: u64,
},
}Expand description
Physics event — reducer-emitted canonical events that trigger GPU simulation.
Variants§
Trait Implementations§
Source§impl Clone for PhysicsEvent
impl Clone for PhysicsEvent
Source§fn clone(&self) -> PhysicsEvent
fn clone(&self) -> PhysicsEvent
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 PhysicsEvent
impl Debug for PhysicsEvent
Source§impl<'de> Deserialize<'de> for PhysicsEvent
impl<'de> Deserialize<'de> for PhysicsEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PhysicsEvent
impl RefUnwindSafe for PhysicsEvent
impl Send for PhysicsEvent
impl Sync for PhysicsEvent
impl Unpin for PhysicsEvent
impl UnsafeUnpin for PhysicsEvent
impl UnwindSafe for PhysicsEvent
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