Player12
An open source football management simulator
Loading...
Searching...
No Matches
imatch_renderer.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2// Football Management Project
3// Copyright (c) 2025 - 2026 Flavio Milinanni. All Rights Reserved.
4//
5// This file is part of the Football Management Project.
6// See the LICENSE file in the project root.
7// -----------------------------------------------------------------------------
8
9#pragma once
10
11#include <cstdint>
12
14
17{
18 float x = 0.0f;
19 float y = 0.0f;
20 float width = 800.0f;
21 float height = 500.0f;
22};
23
25enum class MatchCameraMode : std::uint8_t
26{
27 BROADCAST,
28 TACTICAL,
29 END,
31 FREE,
32 DIRECTOR,
33 PLAY,
34};
35
42{
44 float zoomSteps = 0.0f;
46 float orbitX = 0.0f;
47 float orbitY = 0.0f;
49 bool pan = false;
50 float panFromX = 0.0f;
51 float panFromY = 0.0f;
52 float panToX = 0.0f;
53 float panToY = 0.0f;
55 bool retarget = false;
56 float retargetX = 0.0f;
57 float retargetY = 0.0f;
59 bool followBall = false;
61 bool reset = false;
62};
63
66{
67 bool showAiDebug = false;
69 bool showPlayerNames = false;
71 float frameSeconds = 0.0f;
76 const char* homeLabel = nullptr;
77 const char* awayLabel = nullptr;
81 bool dayLook = false;
83 bool pressureOverlay = false;
87};
88
97{
98 public:
99 virtual ~IMatchRenderer() = default;
100
101 virtual void render(const MatchRenderSnapshot& snapshot,
102 const MatchRenderOptions& options,
103 const MatchViewport& viewport) = 0;
104
111 virtual bool projectPitch(Vector2F pitch, float heightMetres, float& screenX,
112 float& screenY) const = 0;
113};
Definition imatch_renderer.h:97
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
MatchCameraMode
Definition imatch_renderer.h:26
Definition imatch_renderer.h:42
float panFromX
Definition imatch_renderer.h:50
float panFromY
Definition imatch_renderer.h:51
float retargetY
Definition imatch_renderer.h:57
float orbitY
Definition imatch_renderer.h:47
bool retarget
Definition imatch_renderer.h:55
float retargetX
Definition imatch_renderer.h:56
float panToY
Definition imatch_renderer.h:53
bool pan
Definition imatch_renderer.h:49
bool reset
Definition imatch_renderer.h:61
bool followBall
Definition imatch_renderer.h:59
float orbitX
Definition imatch_renderer.h:46
float panToX
Definition imatch_renderer.h:52
float zoomSteps
Definition imatch_renderer.h:44
Definition imatch_renderer.h:66
int kickoffMinutes
Definition imatch_renderer.h:79
bool showPlayerNames
Definition imatch_renderer.h:69
bool dayLook
Definition imatch_renderer.h:81
bool showAiDebug
Definition imatch_renderer.h:67
MatchCameraInput cameraInput
Definition imatch_renderer.h:73
MatchCameraMode cameraMode
Definition imatch_renderer.h:74
const char * awayLabel
Definition imatch_renderer.h:77
float frameSeconds
Definition imatch_renderer.h:71
PlayerID activePlayer
Definition imatch_renderer.h:86
const char * homeLabel
Definition imatch_renderer.h:76
bool pressureOverlay
Definition imatch_renderer.h:83
Definition match_render_snapshot.h:89
Definition imatch_renderer.h:17
float width
Definition imatch_renderer.h:20
float y
Definition imatch_renderer.h:19
float height
Definition imatch_renderer.h:21
float x
Definition imatch_renderer.h:18
A simple 2D float vector for pitch coordinates.
Definition types.h:84
uint32_t PlayerID
Type alias for Player identifiers.
Definition types.h:21