Player12
An open source football management simulator
Loading...
Searching...
No Matches
MatchRenderer2D Class Referencefinal

#include <match_renderer_2d.h>

Inheritance diagram for MatchRenderer2D:
IMatchRenderer

Classes

struct  State
 

Public Member Functions

 MatchRenderer2D ()
 
 ~MatchRenderer2D () override
 
 MatchRenderer2D (const MatchRenderer2D &)=delete
 
MatchRenderer2D & operator= (const MatchRenderer2D &)=delete
 
 MatchRenderer2D (MatchRenderer2D &&)=delete
 
MatchRenderer2D & operator= (MatchRenderer2D &&)=delete
 
void render (const MatchRenderSnapshot &snapshot, const MatchRenderOptions &options, const MatchViewport &viewport) override
 
bool projectPitch (Vector2F pitch, float heightMetres, float &screenX, float &screenY) const override
 
- Public Member Functions inherited from IMatchRenderer
virtual ~IMatchRenderer ()=default
 

Private Attributes

std::unique_ptr< State > state
 

Detailed Description

ImGui/SDL-agnostic 2D tactical match renderer.

Draws the stadium surround, a lit and mown pitch with its markings and goals, top-down kit tokens (shirt, shorts ring, number, facing wedge), the ball with its shadow and trail, brief pass and shot paths, offside flashes and an optional pitch-control overlay into the current ImGui draw list. Consumes only the read-only snapshot and never touches the simulation; everything is interpolated with snapshot.interpolationAlpha.

Constructor & Destructor Documentation

◆ MatchRenderer2D() [1/3]

MatchRenderer2D::MatchRenderer2D ( )

◆ ~MatchRenderer2D()

MatchRenderer2D::~MatchRenderer2D ( )
overridedefault

◆ MatchRenderer2D() [2/3]

MatchRenderer2D::MatchRenderer2D ( const MatchRenderer2D &  )
delete

◆ MatchRenderer2D() [3/3]

MatchRenderer2D::MatchRenderer2D ( MatchRenderer2D &&  )
delete

Member Function Documentation

◆ operator=() [1/2]

MatchRenderer2D & MatchRenderer2D::operator= ( const MatchRenderer2D &  )
delete

◆ operator=() [2/2]

MatchRenderer2D & MatchRenderer2D::operator= ( MatchRenderer2D &&  )
delete

◆ projectPitch()

bool MatchRenderer2D::projectPitch ( Vector2F  pitch,
float  heightMetres,
float &  screenX,
float &  screenY 
) const
overridevirtual

Screen position (logical pixels) of a normalised pitch point at a height in metres, as drawn by the last render(), so overlays can be drawn in the view's projection. False before the first frame or when the point is behind the camera.

Implements IMatchRenderer.

◆ render()

void MatchRenderer2D::render ( const MatchRenderSnapshot &  snapshot,
const MatchRenderOptions &  options,
const MatchViewport &  viewport 
)
overridevirtual

Implements IMatchRenderer.

Member Data Documentation

◆ state

std::unique_ptr<State> MatchRenderer2D::state
private

The documentation for this class was generated from the following files: