⌖ Position
The Position concept is responsible for the
spatial representation of the cellular agent.
Example: Point-Like Particle
The most widely-known example is that of representing cellular agents as point-like objects.
In this case, cells are described by a postion vector of (typically ) dimensions which
we will call VectorN for simplicity.
If we implement these properties, we obtain
struct MyCell {
pos: VectorN,
}
impl Position<VectorN> for MyCell {
fn pos(&self) -> VectorN {
self.pos.clone()
}
fn set_pos(&mut self, pos: &VectorN) {
self.pos = pos.clone();
}
}