pub struct RotationCalculator { /* private fields */ }Expand description
Tracks rotational roles over time.
Implementations§
Source§impl RotationCalculator
impl RotationCalculator
pub fn new() -> Self
pub fn with_config(config: RotationCalculatorConfig) -> Self
pub fn config(&self) -> &RotationCalculatorConfig
pub fn role_events(&self) -> Vec<RotationRoleEvent> ⓘ
pub fn first_man_change_events(&self) -> &[FirstManChangeEvent]
Sourcepub fn new_role_events(&self) -> &[RotationRoleEvent] ⓘ
pub fn new_role_events(&self) -> &[RotationRoleEvent] ⓘ
Role spans closed during the current frame’s update.
Sourcepub fn flush_pending_events(&mut self)
pub fn flush_pending_events(&mut self)
Close every open role span so the projected event stream is final.
Sourcepub fn current_role_and_depth(
&self,
player_id: &PlayerId,
) -> (RoleState, PlayDepthState)
pub fn current_role_and_depth( &self, player_id: &PlayerId, ) -> (RoleState, PlayDepthState)
The rotation role and play-depth the player currently holds, as of the most recently processed frame. Used by downstream consumers (e.g. touch classification) to tag events with the toucher’s rotation context.
pub fn update( &mut self, frame: &FrameInfo, gameplay: &GameplayState, ball: &BallFrameState, players: &PlayerFrameState, events: &FrameEventsState, live_play_state: &LivePlayState, ) -> SubtrActorResult<()>
Trait Implementations§
Source§impl Clone for RotationCalculator
impl Clone for RotationCalculator
Source§impl Debug for RotationCalculator
impl Debug for RotationCalculator
Auto Trait Implementations§
impl Freeze for RotationCalculator
impl RefUnwindSafe for RotationCalculator
impl Send for RotationCalculator
impl Sync for RotationCalculator
impl Unpin for RotationCalculator
impl UnsafeUnpin for RotationCalculator
impl UnwindSafe for RotationCalculator
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