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