pub struct DoubleTapCalculator { /* private fields */ }Expand description
Detects double taps from a backboard-bounce sequence.
Current heuristic:
- A
BackboardBounceEventarms a pending double tap for the player who last touched the ball before the bounce. The exact backboard geometry and attribution thresholds live inBackboardBounceCalculator. - The touch that armed the backboard bounce must be airborne.
- The same player must remain off ground, wall, and ceiling surfaces.
- The same player must make the next attributed ball touch while the replay is in live play.
- The ball’s post-touch constant-velocity trajectory must project into or close to the opponent goal mouth.
The detector intentionally does not aim at the center of the goal. Near-post shots and cross-goal trajectories can be valid double taps even when their velocity is poorly aligned with the goal center.
Implementations§
Source§impl DoubleTapCalculator
impl DoubleTapCalculator
pub fn new() -> Self
pub fn events(&self) -> &[DoubleTapEvent]
pub fn new_events(&self) -> &[DoubleTapEvent]
pub fn update( &mut self, frame: &FrameInfo, ball: &BallFrameState, players: &PlayerFrameState, touch_state: &TouchState, backboard_bounce_state: &BackboardBounceState, live_play_state: &LivePlayState, ) -> SubtrActorResult<()>
Trait Implementations§
Source§impl Clone for DoubleTapCalculator
impl Clone for DoubleTapCalculator
Source§impl Debug for DoubleTapCalculator
impl Debug for DoubleTapCalculator
Auto Trait Implementations§
impl Freeze for DoubleTapCalculator
impl RefUnwindSafe for DoubleTapCalculator
impl Send for DoubleTapCalculator
impl Sync for DoubleTapCalculator
impl Unpin for DoubleTapCalculator
impl UnsafeUnpin for DoubleTapCalculator
impl UnwindSafe for DoubleTapCalculator
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