106 const std::vector<MatchEvent>*
events =
nullptr;
129 snapshot.
players.reserve(players.size());
154 ? previousPositions[
index]
157 ? previousFacingAngles[
index]
209 return {first.
x + (second.
x - first.
x) * alpha,
210 first.
y + (second.
y - first.
y) * alpha};
Definition match_engine.h:517
float getPreviousBallZ() const
Definition match_engine.h:904
Vector2F getPreviousBallPosition() const
Definition match_engine.h:903
bool getGoalScoredByHome() const
Definition match_engine.h:880
const MatchStats & getStats() const
Definition match_engine.h:751
const std::vector< PlayerMatchStats > & getPlayerStats() const
Definition match_engine.h:796
const MatchBall & getBall() const
Definition match_engine.h:743
TeamPhase getAwayPhase() const
Definition match_engine.h:753
int getPeriod() const
Definition match_engine.h:821
const std::vector< Vector2F > & getPreviousPlayerPositions() const
Definition match_engine.h:895
MatchState getState() const
Definition match_engine.h:750
float getGoalCelebrationDuration() const
Definition match_engine.h:884
GoalkeeperState getAwayGoalkeeperState() const
Definition match_engine.h:912
const std::vector< float > & getPreviousPlayerFacingAngles() const
Definition match_engine.h:899
TeamPhase getHomePhase() const
Definition match_engine.h:752
const std::vector< MatchPlayer > & getPlayers() const
Definition match_engine.h:742
float getTransitionSecondsRemaining() const
Definition match_engine.h:754
const std::vector< MatchEvent > & getEvents() const
Definition match_engine.h:744
int getHomeScore() const
Definition match_engine.h:868
float getGoalCelebrationRemaining() const
Definition match_engine.h:883
float getInterpolationAlpha() const
Definition match_engine.cpp:1614
float getMatchTimeMinutes() const
Definition match_engine.h:870
int getAwayScore() const
Definition match_engine.h:869
GoalkeeperState getHomeGoalkeeperState() const
Definition match_engine.h:911
int getAddedMinutes(int half) const
Definition match_engine.h:823
Persistent career identity, attributes, traits and day-to-day state.
Definition player.h:104
PlayerIntent
Definition match_engine.h:64
TeamPhase
Definition match_engine.h:52
GoalkeeperState
Definition match_engine.h:119
MatchState
Definition match_engine.h:34
MatchRenderSnapshot buildMatchRenderSnapshot(const MatchEngine &engine)
Definition match_render_snapshot.h:199
void fillMatchRenderSnapshot(const MatchEngine &engine, MatchRenderSnapshot &snapshot)
Definition match_render_snapshot.h:122
Vector2F lerpRenderPosition(Vector2F first, Vector2F second, float alpha)
Definition match_render_snapshot.h:207
int index
Definition runtime_editor.cpp:94
Definition match_engine.h:220
float z
Definition match_engine.h:222
const Player * kicker
Definition match_engine.h:231
float kickerLockout
Definition match_engine.h:233
Vector2F position
Definition match_engine.h:221
bool isAerialDelivery
Definition match_engine.h:260
bool fromThrowIn
Definition match_engine.h:262
bool isShot
Definition match_engine.h:246
const Player * possessedBy
Definition match_engine.h:227
Definition match_engine.h:151
int yellowCards
Definition match_engine.h:209
float stamina
Definition match_engine.h:178
Vector2F position
Definition match_engine.h:154
bool isInjured
Definition match_engine.h:205
bool isHomeTeam
Definition match_engine.h:153
bool isDiving
Definition match_engine.h:172
float heightMetres
Definition match_engine.h:199
float facingAngle
Definition match_engine.h:166
const Player * player
Definition match_engine.h:152
bool onPitch
Definition match_engine.h:202
Vector2F velocity
Definition match_engine.h:155
bool isGoalkeeper
Definition match_engine.h:204
float tackleCooldown
Definition match_engine.h:186
Vector2F movementTarget
Definition match_engine.h:157
PlayerIntent intent
Definition match_engine.h:159
Definition match_render_snapshot.h:65
bool fromThrowIn
Definition match_render_snapshot.h:78
float currentZ
Definition match_render_snapshot.h:71
const Player * possessedBy
Definition match_render_snapshot.h:72
const Player * kicker
Definition match_render_snapshot.h:84
float currentHeightMetres
Definition match_render_snapshot.h:74
float kickerLockout
Definition match_render_snapshot.h:85
Vector2F previousPosition
Definition match_render_snapshot.h:66
bool isShot
Definition match_render_snapshot.h:75
bool isAerialDelivery
Definition match_render_snapshot.h:76
Vector2F currentPosition
Definition match_render_snapshot.h:68
float previousZ
Definition match_render_snapshot.h:70
float previousHeightMetres
Definition match_render_snapshot.h:73
Definition match_render_snapshot.h:36
Vector2F currentPosition
Definition match_render_snapshot.h:41
Vector2F previousPosition
Definition match_render_snapshot.h:39
float currentFacingAngle
Definition match_render_snapshot.h:47
bool onPitch
Definition match_render_snapshot.h:51
float tackleCooldown
Definition match_render_snapshot.h:61
bool isHomeTeam
Definition match_render_snapshot.h:38
PlayerIntent intent
Definition match_render_snapshot.h:45
Vector2F movementTarget
Definition match_render_snapshot.h:43
bool isDiving
Definition match_render_snapshot.h:53
float heightMetres
Definition match_render_snapshot.h:56
float speedMetresPerSecond
Definition match_render_snapshot.h:58
const Player * player
Definition match_render_snapshot.h:37
bool possessesBall
Definition match_render_snapshot.h:49
bool isGoalkeeper
Definition match_render_snapshot.h:52
int yellowCards
Definition match_render_snapshot.h:55
float previousFacingAngle
Definition match_render_snapshot.h:46
float stamina
Definition match_render_snapshot.h:48
bool isInjured
Definition match_render_snapshot.h:54
Definition match_render_snapshot.h:89
float transitionSecondsRemaining
Definition match_render_snapshot.h:99
TeamPhase awayPhase
Definition match_render_snapshot.h:98
const std::vector< MatchEvent > * events
Definition match_render_snapshot.h:106
MatchRenderBall ball
Definition match_render_snapshot.h:95
TeamID homeTeam
Definition match_render_snapshot.h:93
bool goalScoredByHome
Definition match_render_snapshot.h:102
float goalCelebrationRemaining
Definition match_render_snapshot.h:103
const std::vector< PlayerMatchStats > * playerStats
Definition match_render_snapshot.h:115
int awayScore
Definition match_render_snapshot.h:101
TeamPhase homePhase
Definition match_render_snapshot.h:97
MatchState state
Definition match_render_snapshot.h:96
int addedMinutesSecondHalf
Definition match_render_snapshot.h:112
const MatchStats * stats
Definition match_render_snapshot.h:107
std::vector< MatchRenderPlayer > players
Definition match_render_snapshot.h:90
TeamID awayTeam
Definition match_render_snapshot.h:94
float matchTimeMinutes
Definition match_render_snapshot.h:105
int homeScore
Definition match_render_snapshot.h:100
int period
Definition match_render_snapshot.h:110
int addedMinutesFirstHalf
Definition match_render_snapshot.h:111
float interpolationAlpha
Definition match_render_snapshot.h:108
GoalkeeperState homeGoalkeeperState
Definition match_render_snapshot.h:113
GoalkeeperState awayGoalkeeperState
Definition match_render_snapshot.h:114
float goalCelebrationDuration
Definition match_render_snapshot.h:104
Definition match_engine.h:266
static constexpr float CENTRE
Definition match_tuning.h:37
static constexpr float GOAL_CELEBRATION_SECONDS
Definition match_tuning.h:126
static constexpr float BALL_Z_METRES
Definition match_tuning.h:900
static constexpr float DEFAULT_PLAYER_HEIGHT_METRES
Definition match_tuning.h:903
A simple 2D float vector for pitch coordinates.
Definition types.h:84
float y
Definition types.h:86
float x
Definition types.h:85
uint16_t TeamID
Type alias for Team identifiers.
Definition types.h:18