Skip to main content

CrowdStep

Trait CrowdStep 

Source
pub trait CrowdStep {
    type Params;

    // Required method
    fn step(
        &self,
        peds: &mut [Pedestrian],
        walls: &[WallSegment],
        params: &Self::Params,
        dt: f64,
        scratch: &mut Scratch,
    );
}
Expand description

Abstract 2-D crowd model with a zero-alloc step entry point.

Implemented by the unit marker types in this module so step_scratch_store can dispatch over any of the five 2-D models through a single generic bound.

Required Associated Types§

Source

type Params

Model-specific parameter bundle.

Required Methods§

Source

fn step( &self, peds: &mut [Pedestrian], walls: &[WallSegment], params: &Self::Params, dt: f64, scratch: &mut Scratch, )

Run one zero-alloc tick over peds using scratch.

Implementors§