Player12
An open source football management simulator
Loading...
Searching...
No Matches
match_render_snapshot.h File Reference
#include <cmath>
#include <vector>
#include "model/match_engine.h"

Go to the source code of this file.

Classes

struct  MatchRenderPlayer
 
struct  MatchRenderBall
 
struct  MatchRenderSnapshot
 

Functions

void fillMatchRenderSnapshot (const MatchEngine &engine, MatchRenderSnapshot &snapshot)
 
MatchRenderSnapshot buildMatchRenderSnapshot (const MatchEngine &engine)
 
Vector2F lerpRenderPosition (Vector2F first, Vector2F second, float alpha)
 

Function Documentation

◆ buildMatchRenderSnapshot()

MatchRenderSnapshot buildMatchRenderSnapshot ( const MatchEngine &  engine)
inline

Builds a read-only render snapshot from a live engine.

◆ fillMatchRenderSnapshot()

void fillMatchRenderSnapshot ( const MatchEngine &  engine,
MatchRenderSnapshot &  snapshot 
)
inline

Refills snapshot from a live engine, reusing its storage so a view that keeps one snapshot allocates nothing per frame.

◆ lerpRenderPosition()

Vector2F lerpRenderPosition ( Vector2F  first,
Vector2F  second,
float  alpha 
)
inline

Linear interpolation of a 2D point used by renderers.