pub struct FieldPresets;Expand description
Factory methods for common in-game force field configurations.
Implementations§
Source§impl FieldPresets
impl FieldPresets
Sourcepub fn planet(center: Vec3, mass: f32) -> ForceField
pub fn planet(center: Vec3, mass: f32) -> ForceField
Planet-like gravity well.
Sourcepub fn tornado(center: Vec3, strength: f32, radius: f32) -> ForceField
pub fn tornado(center: Vec3, strength: f32, radius: f32) -> ForceField
Dust devil / tornado vortex.
Sourcepub fn explosion(center: Vec3, strength: f32, born_at: f32) -> ForceField
pub fn explosion(center: Vec3, strength: f32, born_at: f32) -> ForceField
Omnidirectional explosion shockwave.
Sourcepub fn river(direction: Vec3, speed: f32) -> ForceField
pub fn river(direction: Vec3, speed: f32) -> ForceField
River current flowing in a direction.
Sourcepub fn bonfire(center: Vec3, heat: f32) -> ForceField
pub fn bonfire(center: Vec3, heat: f32) -> ForceField
Bonfire heat column rising upward.
Sourcepub fn galaxy_arm(center: Vec3, scale: f32) -> ForceField
pub fn galaxy_arm(center: Vec3, scale: f32) -> ForceField
Spinning galaxy arm (Lorenz-driven).
Sourcepub fn frost_aura(center: Vec3, radius: f32) -> ForceField
pub fn frost_aura(center: Vec3, radius: f32) -> ForceField
Frost aura: cold damping field.
Sourcepub fn chaos_zone(center: Vec3, radius: f32) -> ForceField
pub fn chaos_zone(center: Vec3, radius: f32) -> ForceField
Chaos zone: pure entropy field.
Auto Trait Implementations§
impl Freeze for FieldPresets
impl RefUnwindSafe for FieldPresets
impl Send for FieldPresets
impl Sync for FieldPresets
impl Unpin for FieldPresets
impl UnsafeUnpin for FieldPresets
impl UnwindSafe for FieldPresets
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.