Player12
An open source football management simulator
Loading...
Searching...
No Matches
Stadium3D Namespace Reference

Namespaces

namespace  CrowdFlags
 

Classes

struct  AdBoard
 
struct  Box
 
struct  CrowdClump
 
struct  CrowdDot
 
struct  CrowdFlag
 
struct  Face
 
struct  Geometry
 
struct  Goal
 
struct  GroundPolygon
 
struct  NetPanel
 
struct  PitchGrid
 
struct  Section
 
struct  SponsorStyle
 

Enumerations

enum class  Side : std::uint8_t {
  SOUTH , NORTH , WEST , EAST ,
  NONE
}
 

Functions

Box makeAxisBox (Vec3 minimum, Vec3 maximum, ImU32 color)
 

Variables

constexpr std::size_t CROWD_PHASES = 16
 
constexpr std::array< SponsorStyle, 8 > SPONSORS
 
constexpr std::array< std::array< std::uint8_t, 4 >, 6 > BOX_FACES
 

Detailed Description

Static world-space geometry of the 3D match view: ground, markings, goals, corner flags, advertising boards, stands with crowd, and floodlights.

Everything is built once per match (the crowd needs the kit colours) and only re-projected per frame by MatchRenderer3D. No RNG is involved: all variation comes from a fixed integer hash so the stadium is identical on every frame and every run.

Enumeration Type Documentation

◆ Side

enum class Stadium3D::Side : std::uint8_t
strong

Which stand a section belongs to; used to hide the stand behind the eye.

Enumerator
SOUTH 
NORTH 
WEST 
EAST 
NONE 

Function Documentation

◆ makeAxisBox()

Box Stadium3D::makeAxisBox ( Vec3  minimum,
Vec3  maximum,
ImU32  color 
)

Builds an axis-aligned box from its minimum and maximum corners.

Variable Documentation

◆ BOX_FACES

constexpr std::array<std::array<std::uint8_t, 4>, 6> Stadium3D::BOX_FACES
inlineconstexpr
Initial value:
{{
{0, 4, 6, 2},
{1, 3, 7, 5},
{0, 1, 5, 4},
{2, 6, 7, 3},
{0, 2, 3, 1},
{4, 5, 7, 6},
}}

Face index table for Box corners; each face winds CCW from outside.

◆ CROWD_PHASES

constexpr std::size_t Stadium3D::CROWD_PHASES = 16
inlineconstexpr

Idle-motion phases a spectator can be in (a small per-frame table).

◆ SPONSORS

constexpr std::array<SponsorStyle, 8> Stadium3D::SPONSORS
inlineconstexpr
Initial value:
{{
{"KESTRELINE", IM_COL32(18, 70, 150, 255), IM_COL32(255, 255, 255, 255)},
{"VOLTRIX", IM_COL32(236, 196, 30, 255), IM_COL32(20, 20, 24, 255)},
{"ORBANO TELECOM", IM_COL32(200, 30, 48, 255),
IM_COL32(255, 255, 255, 255)},
{"PINEFORGE", IM_COL32(16, 110, 70, 255), IM_COL32(240, 250, 240, 255)},
{"AQUALYNE", IM_COL32(20, 170, 200, 255), IM_COL32(10, 30, 60, 255)},
{"SOLENTA", IM_COL32(245, 245, 245, 255), IM_COL32(220, 70, 20, 255)},
{"BRIGHTWELL", IM_COL32(30, 30, 36, 255), IM_COL32(250, 210, 60, 255)},
{"TORVANA", IM_COL32(120, 40, 150, 255), IM_COL32(255, 255, 255, 255)},
}}

Original, fictional advertisers shown on the boards.