pub struct ExplosionDef {
pub mask_bits: u64,
pub position: Pos,
pub radius: f32,
pub falloff: f32,
pub impulse_per_area: f32,
}Expand description
The explosion definition is used to configure options for explosions. Explosions consider shape geometry when computing the impulse. (b3ExplosionDef)
Fields§
§mask_bits: u64Mask bits to filter shapes
position: PosThe center of the explosion in world space
radius: f32The radius of the explosion
falloff: f32The falloff distance beyond the radius. Impulse is reduced to zero at this distance.
impulse_per_area: f32Impulse per unit area. This applies an impulse according to the shape area that is facing the explosion. Explosions only apply to spheres, capsules, and hulls. This may be negative for implosions.
Trait Implementations§
Source§impl Clone for ExplosionDef
impl Clone for ExplosionDef
Source§fn clone(&self) -> ExplosionDef
fn clone(&self) -> ExplosionDef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ExplosionDef
Source§impl Debug for ExplosionDef
impl Debug for ExplosionDef
Source§impl Default for ExplosionDef
impl Default for ExplosionDef
Source§impl PartialEq for ExplosionDef
impl PartialEq for ExplosionDef
impl StructuralPartialEq for ExplosionDef
Auto Trait Implementations§
impl Freeze for ExplosionDef
impl RefUnwindSafe for ExplosionDef
impl Send for ExplosionDef
impl Sync for ExplosionDef
impl Unpin for ExplosionDef
impl UnsafeUnpin for ExplosionDef
impl UnwindSafe for ExplosionDef
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