|
Player12
An open source football management simulator
|
Public Member Functions | |
| State () | |
| void | prepareMatch (const MatchRenderSnapshot &snapshot) |
| MatchCameraFocus | computeFocus (const MatchRenderSnapshot &snapshot, float deltaSeconds) |
| MatchCameraControl | cameraControl (const MatchCameraInput &input) const |
| void | drawSky () |
| void | emitRaw (std::span< const ImVec2 > screen, std::span< const ImU32 > colors) |
| void | drawWorldPolygon (std::span< const Vec3 > world, std::span< const ImU32 > colors, bool antiAliased) |
| void | drawGroundEllipse (Vec3 centre, Vec3 axisA, Vec3 axisB, ImU32 color) |
| void | drawSoftEllipse (Vec3 centre, Vec3 axisA, Vec3 axisB, ImU32 color) |
| void | drawPitch () |
| void | drawShadows (const MatchRenderSnapshot &snapshot, float alpha) |
| void | drawStadium () |
| void | reserveBatch (int vertices, int indices) |
| void | releaseBatch () |
| void | batchFan (std::span< const ImVec2 > screen, std::span< const ImU32 > colors) |
| void | batchQuad (ImVec2 bottomLeft, ImVec2 bottomRight, ImVec2 topRight, ImVec2 topLeft, ImU32 bottom, ImU32 top) |
| void | updateCrowdMotion () |
| void | drawCrowd (const Stadium3D::Face &face) |
| void | drawCrowdFlags (const Stadium3D::Face &face, float upX, float upY) |
| void | drawVignette () |
| void | addPolygon (std::span< const ScreenPoint > screen, ImU32 color, float objectDepth, float localDepth) |
| void | addLine (Vec3 from, Vec3 to, ImU32 color, float thickness, float objectDepth) |
| void | addBox (const std::array< Vec3, 8 > &corners, ImU32 color, float objectDepth) |
| void | addPrism (std::span< const Vec3 > bottom, std::span< const Vec3 > top, ImU32 color, float objectDepth, bool capBottom, bool capTop) |
| void | orientedBox (Vec3 centre, Vec3 axisA, Vec3 axisB, Vec3 axisC, ImU32 color, float objectDepth) |
| void | addSegment (Vec3 from, Vec3 to, float fromHalf, float toHalf, ImU32 color, SegmentStyle style) |
| void | updateMotion (const MatchRenderPlayer &player, AnimationSlot &slot, float alpha, float deltaSeconds) |
| void | findBallHolder (const MatchRenderSnapshot &snapshot, float alpha) |
| int | shirtNumberFor (const MatchRenderPlayer &player) |
| GoalMood | goalMoodFor (const MatchRenderPlayer &player) const |
| void | addPlayer (const MatchRenderPlayer &player, AnimationSlot &slot, float alpha) |
| void | addBackPrint (const AnimationSlot &slot, std::size_t kitIndex, Vec3 waist, const BodyFrame &frame, float scale, float objectDepth) |
| void | drawBackText (const Primitive &primitive) |
| void | detectTouches (const MatchRenderSnapshot &snapshot) |
| void | updateGoalMoment (const MatchRenderSnapshot &snapshot) |
| void | addGoals () |
| void | addCornerFlags () |
| void | addBoards () |
| void | addBall (const MatchRenderSnapshot &snapshot, float alpha) |
| void | flushSorted () |
| void | drawHead (const Primitive &primitive) |
| void | drawBoard (const Primitive &primitive) |
| void | drawBoardLogo (const Stadium3D::AdBoard &board, const Stadium3D::SponsorStyle &style, Vec3 origin, float width, float height) |
| void | drawLabelsAndHover (const MatchRenderOptions &options) |
| void | drawScoreBug (const MatchRenderSnapshot &snapshot, const MatchRenderOptions &options) |
| void | drawGoalSting (const MatchRenderSnapshot &snapshot) |
Public Attributes | |
| Stadium3D::Geometry | geometry |
| bool | geometryBuilt = false |
| TeamID | homeTeam = 0 |
| TeamID | awayTeam = 0 |
| MatchKits | kits |
| MatchCamera3D | camera |
| RenderMath::Projection | projection |
| bool | hasProjection = false |
| ImDrawList * | drawList = nullptr |
| ImVec2 | whitePixel |
| float | elapsedSeconds = 0.0f |
| float | frameSeconds = 0.0f |
| float | attackDirection = 1.0f |
| float | directionChangeSeconds = 0.0f |
| bool | jumped = false |
| bool | day = false |
| LightRig | light = nightLight() |
| float | ballSpin = 0.0f |
| Vec3 | lastBallWorld |
| ImVec2 | ballRoll {1.0f, 0.0f} |
| std::array< KitColors, 4 > | kitList {} |
| std::array< ImU32, 4 > | numberColors {} |
| std::array< ImU32, 4 > | gloveColors {} |
| MatchShirtNumbers | numbers |
| float | simSeconds = 0.0f |
| float | lastMatchMinutes = -1.0f |
| bool | reducedMotion = false |
| bool | livePlay = false |
| Vec3 | ballWorld |
| GoalkeeperState | homeKeeperState = GoalkeeperState::SET_POSITION |
| GoalkeeperState | awayKeeperState = GoalkeeperState::SET_POSITION |
| const std::vector< PlayerMatchStats > * | playerStats = nullptr |
| float | lastKickerLockout = 0.0f |
| const MatchRenderPlayer * | heldBy = nullptr |
| Vec3 | heldBallWorld |
| bool | heldBallPlaced = false |
| GoalMomentState | goal |
| float | celebrationWeight = 0.0f |
| float | crowdCelebration = 0.0f |
| std::array< float, Stadium3D::CROWD_PHASES > | crowdSway {} |
| std::array< float, Stadium3D::CROWD_PHASES > | crowdHop {} |
| float | crowdTension = 0.0f |
| std::array< float, Stadium3D::CROWD_PHASES > | crowdRise {} |
| std::byte | cheeringMask {} |
| int | batchVertices = 0 |
| int | batchIndices = 0 |
| std::vector< Vec4 > | pitchClip |
| std::vector< ImVec2 > | pitchScreen |
| std::vector< ImU32 > | pitchColors |
| float | pitchSwing = 0.0f |
| bool | pitchDay = false |
| std::vector< AnimationSlot > | slots |
| std::vector< ImVec2 > | points |
| std::vector< Primitive > | primitives |
| std::vector< SortKey > | keys |
| std::vector< const char * > | texts |
| std::vector< std::pair< float, std::uint32_t > > | sectionOrder |
| std::vector< PlayerOnScreen > | playersOnScreen |
|
inline |
| void MatchRenderer3D::State::addBackPrint | ( | const AnimationSlot & | slot, |
| std::size_t | kitIndex, | ||
| Vec3 | waist, | ||
| const BodyFrame & | frame, | ||
| float | scale, | ||
| float | objectDepth | ||
| ) |
| void MatchRenderer3D::State::addBall | ( | const MatchRenderSnapshot & | snapshot, |
| float | alpha | ||
| ) |
| void MatchRenderer3D::State::addBoards | ( | ) |
| void MatchRenderer3D::State::addBox | ( | const std::array< Vec3, 8 > & | corners, |
| ImU32 | color, | ||
| float | objectDepth | ||
| ) |
| void MatchRenderer3D::State::addCornerFlags | ( | ) |
| void MatchRenderer3D::State::addGoals | ( | ) |
| void MatchRenderer3D::State::addLine | ( | Vec3 | from, |
| Vec3 | to, | ||
| ImU32 | color, | ||
| float | thickness, | ||
| float | objectDepth | ||
| ) |
| void MatchRenderer3D::State::addPlayer | ( | const MatchRenderPlayer & | player, |
| AnimationSlot & | slot, | ||
| float | alpha | ||
| ) |
| void MatchRenderer3D::State::addPolygon | ( | std::span< const ScreenPoint > | screen, |
| ImU32 | color, | ||
| float | objectDepth, | ||
| float | localDepth | ||
| ) |
| void MatchRenderer3D::State::addPrism | ( | std::span< const Vec3 > | bottom, |
| std::span< const Vec3 > | top, | ||
| ImU32 | color, | ||
| float | objectDepth, | ||
| bool | capBottom, | ||
| bool | capTop | ||
| ) |
Lit prism between two rings of the same size (up to 8 sides).
| void MatchRenderer3D::State::addSegment | ( | Vec3 | from, |
| Vec3 | to, | ||
| float | fromHalf, | ||
| float | toHalf, | ||
| ImU32 | color, | ||
| SegmentStyle | style | ||
| ) |
Limb segment between two joints, tapering from fromHalf to toHalf (a prism up close, a box further out, a stroke far away).
| void MatchRenderer3D::State::batchFan | ( | std::span< const ImVec2 > | screen, |
| std::span< const ImU32 > | colors | ||
| ) |
| void MatchRenderer3D::State::batchQuad | ( | ImVec2 | bottomLeft, |
| ImVec2 | bottomRight, | ||
| ImVec2 | topRight, | ||
| ImVec2 | topLeft, | ||
| ImU32 | bottom, | ||
| ImU32 | top | ||
| ) |
| MatchCameraControl MatchRenderer3D::State::cameraControl | ( | const MatchCameraInput & | input | ) | const |
Turns the view's mouse input into world-space camera control.
| MatchCameraFocus MatchRenderer3D::State::computeFocus | ( | const MatchRenderSnapshot & | snapshot, |
| float | deltaSeconds | ||
| ) |
| void MatchRenderer3D::State::detectTouches | ( | const MatchRenderSnapshot & | snapshot | ) |
Starts kick, header and tackle poses from the engine's touches.
| void MatchRenderer3D::State::drawBackText | ( | const Primitive & | primitive | ) |
| void MatchRenderer3D::State::drawBoard | ( | const Primitive & | primitive | ) |
| void MatchRenderer3D::State::drawBoardLogo | ( | const Stadium3D::AdBoard & | board, |
| const Stadium3D::SponsorStyle & | style, | ||
| Vec3 | origin, | ||
| float | width, | ||
| float | height | ||
| ) |
| void MatchRenderer3D::State::drawCrowd | ( | const Stadium3D::Face & | face | ) |
| void MatchRenderer3D::State::drawCrowdFlags | ( | const Stadium3D::Face & | face, |
| float | upX, | ||
| float | upY | ||
| ) |
| void MatchRenderer3D::State::drawGoalSting | ( | const MatchRenderSnapshot & | snapshot | ) |
| void MatchRenderer3D::State::drawGroundEllipse | ( | Vec3 | centre, |
| Vec3 | axisA, | ||
| Vec3 | axisB, | ||
| ImU32 | color | ||
| ) |
| void MatchRenderer3D::State::drawHead | ( | const Primitive & | primitive | ) |
| void MatchRenderer3D::State::drawLabelsAndHover | ( | const MatchRenderOptions & | options | ) |
| void MatchRenderer3D::State::drawPitch | ( | ) |
The mown playing surface (vertex grid, per-frame stripe tint).
| void MatchRenderer3D::State::drawScoreBug | ( | const MatchRenderSnapshot & | snapshot, |
| const MatchRenderOptions & | options | ||
| ) |
| void MatchRenderer3D::State::drawShadows | ( | const MatchRenderSnapshot & | snapshot, |
| float | alpha | ||
| ) |
| void MatchRenderer3D::State::drawSky | ( | ) |
| void MatchRenderer3D::State::drawSoftEllipse | ( | Vec3 | centre, |
| Vec3 | axisA, | ||
| Vec3 | axisB, | ||
| ImU32 | color | ||
| ) |
Radial-gradient ellipse (dark centre, clear rim) for soft shadows.
| void MatchRenderer3D::State::drawStadium | ( | ) |
| void MatchRenderer3D::State::drawVignette | ( | ) |
| void MatchRenderer3D::State::drawWorldPolygon | ( | std::span< const Vec3 > | world, |
| std::span< const ImU32 > | colors, | ||
| bool | antiAliased | ||
| ) |
| void MatchRenderer3D::State::emitRaw | ( | std::span< const ImVec2 > | screen, |
| std::span< const ImU32 > | colors | ||
| ) |
| void MatchRenderer3D::State::findBallHolder | ( | const MatchRenderSnapshot & | snapshot, |
| float | alpha | ||
| ) |
Who holds the ball in his hands this frame (keeper, throw-in).
| void MatchRenderer3D::State::flushSorted | ( | ) |
| GoalMood MatchRenderer3D::State::goalMoodFor | ( | const MatchRenderPlayer & | player | ) | const |
| void MatchRenderer3D::State::orientedBox | ( | Vec3 | centre, |
| Vec3 | axisA, | ||
| Vec3 | axisB, | ||
| Vec3 | axisC, | ||
| ImU32 | color, | ||
| float | objectDepth | ||
| ) |
Oriented box from its centre and three half axes.
| void MatchRenderer3D::State::prepareMatch | ( | const MatchRenderSnapshot & | snapshot | ) |
| void MatchRenderer3D::State::releaseBatch | ( | ) |
| void MatchRenderer3D::State::reserveBatch | ( | int | vertices, |
| int | indices | ||
| ) |
Crowd and pitch geometry go through chunked reservations (16-bit indices); release before any other draw-list call.
| int MatchRenderer3D::State::shirtNumberFor | ( | const MatchRenderPlayer & | player | ) |
| void MatchRenderer3D::State::updateCrowdMotion | ( | ) |
Fills the idle-sway and goal-hop tables for this frame.
| void MatchRenderer3D::State::updateGoalMoment | ( | const MatchRenderSnapshot & | snapshot | ) |
Tracks the goal being celebrated (sting, net ripple, reactions).
| void MatchRenderer3D::State::updateMotion | ( | const MatchRenderPlayer & | player, |
| AnimationSlot & | slot, | ||
| float | alpha, | ||
| float | deltaSeconds | ||
| ) |
Advances a player's gait, planted feet, actions and keeper stances.
| float MatchRenderer3D::State::attackDirection = 1.0f |
| GoalkeeperState MatchRenderer3D::State::awayKeeperState = GoalkeeperState::SET_POSITION |
| TeamID MatchRenderer3D::State::awayTeam = 0 |
| ImVec2 MatchRenderer3D::State::ballRoll {1.0f, 0.0f} |
| float MatchRenderer3D::State::ballSpin = 0.0f |
Ball panel rotation and its on-screen roll direction.
| Vec3 MatchRenderer3D::State::ballWorld |
| int MatchRenderer3D::State::batchIndices = 0 |
| int MatchRenderer3D::State::batchVertices = 0 |
| MatchCamera3D MatchRenderer3D::State::camera |
| float MatchRenderer3D::State::celebrationWeight = 0.0f |
0..1 weight of the players' goal reactions this frame.
| std::byte MatchRenderer3D::State::cheeringMask {} |
CHEERS_* bit of the celebrating supporters (0: nobody).
| float MatchRenderer3D::State::crowdCelebration = 0.0f |
0..1 weight of the crowd's goal celebration this frame.
| std::array<float, Stadium3D::CROWD_PHASES> MatchRenderer3D::State::crowdHop {} |
| std::array<float, Stadium3D::CROWD_PHASES> MatchRenderer3D::State::crowdRise {} |
| std::array<float, Stadium3D::CROWD_PHASES> MatchRenderer3D::State::crowdSway {} |
Idle sway and celebration hop offsets per crowd phase (metres).
| float MatchRenderer3D::State::crowdTension = 0.0f |
0..1 build-up of the crowd rising for a shot or a chance.
| bool MatchRenderer3D::State::day = false |
Daylight preset this frame (kick-off time or the view toggle).
| float MatchRenderer3D::State::directionChangeSeconds = 0.0f |
| ImDrawList* MatchRenderer3D::State::drawList = nullptr |
| float MatchRenderer3D::State::elapsedSeconds = 0.0f |
| float MatchRenderer3D::State::frameSeconds = 0.0f |
Real seconds of the current frame.
| Stadium3D::Geometry MatchRenderer3D::State::geometry |
| bool MatchRenderer3D::State::geometryBuilt = false |
| std::array<ImU32, 4> MatchRenderer3D::State::gloveColors {} |
| GoalMomentState MatchRenderer3D::State::goal |
| bool MatchRenderer3D::State::hasProjection = false |
False until a frame was projected (input maps through it).
| bool MatchRenderer3D::State::heldBallPlaced = false |
| Vec3 MatchRenderer3D::State::heldBallWorld |
| const MatchRenderPlayer* MatchRenderer3D::State::heldBy = nullptr |
Holding the ball in his hands (keeper, throw-in taker), and where the hands put it this frame.
| GoalkeeperState MatchRenderer3D::State::homeKeeperState = GoalkeeperState::SET_POSITION |
| TeamID MatchRenderer3D::State::homeTeam = 0 |
| bool MatchRenderer3D::State::jumped = false |
The play jumped this frame (playback skip): cameras cut, not ease.
| std::vector<SortKey> MatchRenderer3D::State::keys |
| std::array<KitColors, 4> MatchRenderer3D::State::kitList {} |
Kits indexed home, home keeper, away, away keeper.
| MatchKits MatchRenderer3D::State::kits |
| Vec3 MatchRenderer3D::State::lastBallWorld |
| float MatchRenderer3D::State::lastKickerLockout = 0.0f |
The kicker's lockout last frame (a rise marks a strike).
| float MatchRenderer3D::State::lastMatchMinutes = -1.0f |
| LightRig MatchRenderer3D::State::light = nightLight() |
| bool MatchRenderer3D::State::livePlay = false |
| std::array<ImU32, 4> MatchRenderer3D::State::numberColors {} |
| MatchShirtNumbers MatchRenderer3D::State::numbers |
| std::vector<Vec4> MatchRenderer3D::State::pitchClip |
Clip-space pitch grid vertices of this frame.
| std::vector<ImU32> MatchRenderer3D::State::pitchColors |
Grid colours with the current stripe tint (rebuilt on change).
| bool MatchRenderer3D::State::pitchDay = false |
| std::vector<ImVec2> MatchRenderer3D::State::pitchScreen |
| float MatchRenderer3D::State::pitchSwing = 0.0f |
| std::vector<PlayerOnScreen> MatchRenderer3D::State::playersOnScreen |
| const std::vector<PlayerMatchStats>* MatchRenderer3D::State::playerStats = nullptr |
| std::vector<ImVec2> MatchRenderer3D::State::points |
| std::vector<Primitive> MatchRenderer3D::State::primitives |
| RenderMath::Projection MatchRenderer3D::State::projection |
| bool MatchRenderer3D::State::reducedMotion = false |
| std::vector<std::pair<float, std::uint32_t> > MatchRenderer3D::State::sectionOrder |
| float MatchRenderer3D::State::simSeconds = 0.0f |
Simulated seconds since the previous frame (0 while paused).
| std::vector<AnimationSlot> MatchRenderer3D::State::slots |
| std::vector<const char*> MatchRenderer3D::State::texts |
| ImVec2 MatchRenderer3D::State::whitePixel |