pub struct Flock {
pub config: FlockingConfig,
}Expand description
Computes flocking steering forces.
Fields§
§config: FlockingConfigImplementations§
Source§impl Flock
impl Flock
pub fn new(config: FlockingConfig) -> Self
Sourcepub fn steer(
&self,
agent: &SteeringAgent,
flock: &[FlockingAgent],
) -> SteeringOutput
pub fn steer( &self, agent: &SteeringAgent, flock: &[FlockingAgent], ) -> SteeringOutput
Compute the combined flocking force for agent given its neighbors.
Auto Trait Implementations§
impl Freeze for Flock
impl RefUnwindSafe for Flock
impl Send for Flock
impl Sync for Flock
impl Unpin for Flock
impl UnsafeUnpin for Flock
impl UnwindSafe for Flock
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