pub struct FlockConfig {Show 17 fields
pub alignment_weight: f32,
pub cohesion_weight: f32,
pub separation_weight: f32,
pub avoidance_weight: f32,
pub leader_weight: f32,
pub flee_weight: f32,
pub wander_weight: f32,
pub containment_weight: f32,
pub perception_radius: f32,
pub separation_radius: f32,
pub flee_radius: f32,
pub arrival_radius: f32,
pub max_speed: f32,
pub max_force: f32,
pub min_speed: f32,
pub bounds_min: Vec3,
pub bounds_max: Vec3,
}Expand description
Weights and limits for the boid steering behaviors.
Fields§
§alignment_weight: f32Align velocity with neighbors.
cohesion_weight: f32Move toward neighbor center of mass.
separation_weight: f32Steer away from nearby boids.
avoidance_weight: f32Avoid obstacles.
leader_weight: f32Follow a leader/target.
flee_weight: f32Flee from predators.
wander_weight: f32Random wander steering.
containment_weight: f32Stay inside bounding box.
perception_radius: f32Radius within which neighbors are perceived.
separation_radius: f32Radius within which separation is active.
flee_radius: f32Radius within which the predator is feared.
arrival_radius: f32Arrival slow-down begins within this radius of the leader.
max_speed: f32§max_force: f32§min_speed: f32§bounds_min: Vec3§bounds_max: Vec3Trait Implementations§
Source§impl Clone for FlockConfig
impl Clone for FlockConfig
Source§fn clone(&self) -> FlockConfig
fn clone(&self) -> FlockConfig
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 FlockConfig
impl Debug for FlockConfig
Auto Trait Implementations§
impl Freeze for FlockConfig
impl RefUnwindSafe for FlockConfig
impl Send for FlockConfig
impl Sync for FlockConfig
impl Unpin for FlockConfig
impl UnsafeUnpin for FlockConfig
impl UnwindSafe for FlockConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.