pub enum SimEvent {
AddBody {
mass: f64,
position: Vec3,
velocity: Vec3,
},
ApplyForce {
body_index: usize,
force: Vec3,
},
SetPosition {
body_index: usize,
position: Vec3,
},
SetVelocity {
body_index: usize,
velocity: Vec3,
},
Custom {
name: String,
data: Vec<u8>,
},
}Expand description
Simulation event for state updates.
Variants§
AddBody
Add a body to the simulation.
ApplyForce
Apply force to a body.
SetPosition
Set body position.
SetVelocity
Set body velocity.
Custom
Custom event.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SimEvent
impl<'de> Deserialize<'de> for SimEvent
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 SimEvent
impl RefUnwindSafe for SimEvent
impl Send for SimEvent
impl Sync for SimEvent
impl Unpin for SimEvent
impl UnsafeUnpin for SimEvent
impl UnwindSafe for SimEvent
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