Player12
An open source football management simulator
Loading...
Searching...
No Matches
IMatchRenderer Class Referenceabstract

#include <imatch_renderer.h>

Inheritance diagram for IMatchRenderer:
MatchRenderer2D MatchRenderer3D

Public Member Functions

virtual ~IMatchRenderer ()=default
 
virtual void render (const MatchRenderSnapshot &snapshot, const MatchRenderOptions &options, const MatchViewport &viewport)=0
 
virtual bool projectPitch (Vector2F pitch, float heightMetres, float &screenX, float &screenY) const =0
 

Detailed Description

Renderer-independent match presentation boundary.

Implementations consume a read-only MatchRenderSnapshot, must never call RNG or mutate the engine, and are free to interpolate between the previous and current fixed-step positions using snapshot.interpolationAlpha.

Constructor & Destructor Documentation

◆ ~IMatchRenderer()

virtual IMatchRenderer::~IMatchRenderer ( )
virtualdefault

Member Function Documentation

◆ projectPitch()

virtual bool IMatchRenderer::projectPitch ( Vector2F  pitch,
float  heightMetres,
float &  screenX,
float &  screenY 
) const
pure virtual

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.

Implemented in MatchRenderer2D, and MatchRenderer3D.

◆ render()

virtual void IMatchRenderer::render ( const MatchRenderSnapshot &  snapshot,
const MatchRenderOptions &  options,
const MatchViewport &  viewport 
)
pure virtual

Implemented in MatchRenderer2D, and MatchRenderer3D.


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