pub struct ForcePresets;Expand description
Convenience constructors for common force-field scenarios.
Implementations§
Source§impl ForcePresets
impl ForcePresets
Sourcepub fn earth_gravity() -> ForceFieldKind
pub fn earth_gravity() -> ForceFieldKind
Standard Earth gravity downward.
Sourcepub fn moon_gravity() -> ForceFieldKind
pub fn moon_gravity() -> ForceFieldKind
Low gravity (moon-like).
Sourcepub fn anti_gravity(strength: f32) -> ForceFieldKind
pub fn anti_gravity(strength: f32) -> ForceFieldKind
Anti-gravity / upward lift field.
Sourcepub fn explosion_blast(
center: Vec3,
strength: f32,
radius: f32,
) -> ForceFieldKind
pub fn explosion_blast( center: Vec3, strength: f32, radius: f32, ) -> ForceFieldKind
Explosion radial blast: repulsor at centre.
Sourcepub fn black_hole(
center: Vec3,
strength: f32,
event_horizon: f32,
) -> ForceFieldKind
pub fn black_hole( center: Vec3, strength: f32, event_horizon: f32, ) -> ForceFieldKind
Black-hole pull.
Sourcepub fn heat_shimmer() -> ForceFieldKind
pub fn heat_shimmer() -> ForceFieldKind
Gentle ambient turbulence (e.g. heat shimmer).
Sourcepub fn outdoor_wind(direction: Vec3, base_speed: f32) -> ForceFieldKind
pub fn outdoor_wind(direction: Vec3, base_speed: f32) -> ForceFieldKind
Outdoor wind with gusts.
Sourcepub fn air_resistance() -> ForceFieldKind
pub fn air_resistance() -> ForceFieldKind
Air resistance for fast-moving projectiles.
Sourcepub fn tornado(center: Vec3, strength: f32, radius: f32) -> ForceFieldKind
pub fn tornado(center: Vec3, strength: f32, radius: f32) -> ForceFieldKind
Tornado centred at a point.
Sourcepub fn water_current(
direction: Vec3,
speed: f32,
bounds_min: Vec3,
bounds_max: Vec3,
) -> ForceFieldKind
pub fn water_current( direction: Vec3, speed: f32, bounds_min: Vec3, bounds_max: Vec3, ) -> ForceFieldKind
Water current pushing in a direction within a volume.
Sourcepub fn smoke_buoyancy() -> ForceFieldKind
pub fn smoke_buoyancy() -> ForceFieldKind
Smoke buoyancy (smoke rises, lighter than air).
Auto Trait Implementations§
impl Freeze for ForcePresets
impl RefUnwindSafe for ForcePresets
impl Send for ForcePresets
impl Sync for ForcePresets
impl Unpin for ForcePresets
impl UnsafeUnpin for ForcePresets
impl UnwindSafe for ForcePresets
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.