henad_models/team_assembly/lanes.rs
1use henad_compute::agent_lanes;
2
3// --8<-- [start:lanes]
4agent_lanes! {
5 /// Node lanes for Team Assembly.
6 ///
7 /// Every lane is written in place, since the node pass is empty and the global pass is sequential.
8 ///
9 /// A tick in these lanes is the tick count at the end of the step.
10 /// The first step writes 1, and setup nodes have 0.
11 pub struct TeamLanes {
12 read TeamRead;
13 chunk TeamChunk;
14 /// Tick at which the node was spawned.
15 plain spawn_tick: u64 = 0,
16 /// Tick at which the node last joined a team.
17 plain team_tick: u64 = 0,
18 /// Tick at which the node was last listed as a collaborator candidate, so it is listed at most once a tick.
19 plain mark: u64 = 0,
20 /// Role in the last team, one of `IDLE`, `INCUMBENT` and `NEWCOMER`, set by `prepare_view`.
21 plain color: u8 = 0,
22 /// Horizontal position in world units, or `NaN` in a retired slot.
23 plain pos_x: f32 = 0.0,
24 /// Vertical position in world units, or `NaN` in a retired slot.
25 plain pos_y: f32 = 0.0,
26 }
27 color = color;
28}
29// --8<-- [end:lanes]