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

#include <match_renderer_3d.h>

Inheritance diagram for MatchRenderer3D:
IMatchRenderer

Classes

struct  State
 

Public Member Functions

 MatchRenderer3D ()
 
 ~MatchRenderer3D () override
 
 MatchRenderer3D (const MatchRenderer3D &)=delete
 
MatchRenderer3D & operator= (const MatchRenderer3D &)=delete
 
 MatchRenderer3D (MatchRenderer3D &&)=delete
 
MatchRenderer3D & operator= (MatchRenderer3D &&)=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

Stylised 3D broadcast renderer.

Projects a metric world through a perspective camera on the CPU and draws the result as ImDrawList triangles, so it shares the SDL_Renderer/ImGui path with the 2D view. Static geometry (pitch, markings, stands, crowd, boards, goals) is built once and only re-projected; players, ball and goal parts are depth-sorted back to front each frame (painter's algorithm) with near-plane clipping for ground polygons. Consumes only the read-only snapshot and never touches the simulation.

Constructor & Destructor Documentation

◆ MatchRenderer3D() [1/3]

MatchRenderer3D::MatchRenderer3D ( )

◆ ~MatchRenderer3D()

MatchRenderer3D::~MatchRenderer3D ( )
overridedefault

◆ MatchRenderer3D() [2/3]

MatchRenderer3D::MatchRenderer3D ( const MatchRenderer3D &  )
delete

◆ MatchRenderer3D() [3/3]

MatchRenderer3D::MatchRenderer3D ( MatchRenderer3D &&  )
delete

Member Function Documentation

◆ operator=() [1/2]

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

◆ operator=() [2/2]

MatchRenderer3D & MatchRenderer3D::operator= ( MatchRenderer3D &&  )
delete

◆ projectPitch()

bool MatchRenderer3D::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 MatchRenderer3D::render ( const MatchRenderSnapshot &  snapshot,
const MatchRenderOptions &  options,
const MatchViewport &  viewport 
)
overridevirtual

Implements IMatchRenderer.

Member Data Documentation

◆ state

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

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