Skip to main content

PositioningCalculator

Struct PositioningCalculator 

Source
pub struct PositioningCalculator { /* private fields */ }
Expand description

Tracks per-player field positioning over time.

Implementations§

Source§

impl PositioningCalculator

Source

pub fn new() -> Self

Source

pub fn with_config(config: PositioningCalculatorConfig) -> Self

Source

pub fn config(&self) -> &PositioningCalculatorConfig

Source

pub fn activity_events(&self) -> Vec<PlayerActivityEvent> ⓘ

Source

pub fn field_third_events(&self) -> Vec<FieldThirdEvent> ⓘ

Source

pub fn field_half_events(&self) -> Vec<FieldHalfEvent> ⓘ

Source

pub fn ball_depth_events(&self) -> Vec<BallDepthEvent> ⓘ

Source

pub fn depth_role_events(&self) -> Vec<DepthRoleEvent> ⓘ

Source

pub fn ball_proximity_events(&self) -> Vec<BallProximityEvent> ⓘ

Source

pub fn shadow_defense_events(&self) -> Vec<ShadowDefenseEvent> ⓘ

Source

pub fn new_event_players(&self) -> Vec<PlayerId> ⓘ

Players with a span (any facet) closed during the current frame’s update.

Source

pub fn flush_pending_events(&mut self)

Close every open span so the projected event streams are final.

Source

pub fn update( &mut self, frame: &FrameInfo, gameplay: &GameplayState, ball: &BallFrameState, players: &PlayerFrameState, events: &FrameEventsState, live_play_state: &LivePlayState, possession_player_before_sample: Option<&PlayerId>, ) -> SubtrActorResult<()>

Source

pub fn player_signal(&self, player: &PlayerId) -> PositioningSignalSnapshot

Cumulative distance/possession signal for player through the frames processed so far. Continuous distance is shipped as this per-frame snapshot rather than as events.

Source

pub fn signals(&self) -> &HashMap<PlayerId, PositioningSignalSnapshot>

Trait Implementations§

Source§

impl Clone for PositioningCalculator

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PositioningCalculator

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PositioningCalculator

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.