Trait Interaction

Source
pub trait Interaction<Pos, Vel, Force, Inf = ()>: InteractionInformation<Inf> {
    // Required method
    fn calculate_force_between(
        &self,
        own_pos: &Pos,
        own_vel: &Vel,
        ext_pos: &Pos,
        ext_vel: &Vel,
        ext_info: &Inf,
    ) -> Result<(Force, Force), CalcError>;
}
Expand description

Trait describing force-interactions between cellular agents.

Required Methods§

Source

fn calculate_force_between( &self, own_pos: &Pos, own_vel: &Vel, ext_pos: &Pos, ext_vel: &Vel, ext_info: &Inf, ) -> Result<(Force, Force), CalcError>

Calculates the forces (velocity-derivative) on the corresponding external position given external velocity. By providing velocities, we can calculate terms that are related to friction. The function returns two forces, one acting on the current agent and the other on the external agent.

Implementors§

Source§

impl<Pos, Vel, For, Inf, A> Interaction<Pos, Vel, For, Inf> for CellBox<A>
where A: Interaction<Pos, Vel, For, Inf> + Serialize + for<'a> Deserialize<'a>,