Player12
An open source football management simulator
Loading...
Searching...
No Matches
match_player_rig.h File Reference
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <numbers>
#include "gui/render/match_render_math.h"

Go to the source code of this file.

Classes

struct  PlayerRig::TwoBone
 
struct  PlayerRig::FootState
 
struct  PlayerRig::StrideInput
 
struct  PlayerRig::GaitBands
 
struct  PlayerRig::ActionInput
 
struct  PlayerRig::Swing
 
struct  PlayerRig::KickTiming
 

Namespaces

namespace  PlayerRig
 

Enumerations

enum class  PlayerRig::Action : std::uint8_t {
  PlayerRig::IDLE , PlayerRig::WALK , PlayerRig::JOG , PlayerRig::RUN ,
  PlayerRig::SPRINT , PlayerRig::TURN , PlayerRig::PASS , PlayerRig::SHOT ,
  PlayerRig::CROSS , PlayerRig::HEADER , PlayerRig::TACKLE , PlayerRig::SLIDE ,
  PlayerRig::KEEPER_SET , PlayerRig::KEEPER_DIVE , PlayerRig::KEEPER_HOLD , PlayerRig::THROW_IN ,
  PlayerRig::CELEBRATE , PlayerRig::DEJECTED
}
 
enum class  PlayerRig::Event : std::uint8_t {
  PlayerRig::NONE , PlayerRig::PASS , PlayerRig::SHOT , PlayerRig::CROSS ,
  PlayerRig::HEADER , PlayerRig::TACKLE , PlayerRig::SLIDE , PlayerRig::THROW
}
 
enum class  PlayerRig::Mood : std::uint8_t { PlayerRig::NONE , PlayerRig::CELEBRATE , PlayerRig::DEJECTED }
 

Functions

float PlayerRig::smoothStep (float t)
 
float PlayerRig::flatDistance (Vec3 a, Vec3 b)
 
TwoBone PlayerRig::solveTwoBone (Vec3 root, Vec3 target, float upper, float lower, Vec3 pole)
 
float PlayerRig::rollOntoToes (Vec3 &ankle, Vec3 hip, Vec3 footForward, float toeLength, float reach, float maxAngle)
 
Vec3 PlayerRig::stanceSpot (const StrideInput &input, float share)
 
Vec3 PlayerRig::stepFoot (FootState &foot, const StrideInput &input)
 
Action PlayerRig::locomotionFor (float speed, const GaitBands &bands={})
 
Action PlayerRig::selectAction (const ActionInput &input, const GaitBands &bands={})
 
float PlayerRig::dutyFactor (float speed)
 
Swing PlayerRig::followThroughFor (Event event)
 
Vec3 PlayerRig::kickAnkle (Event event, float seconds, Vec3 contact, Vec3 direction, Vec3 across, const KickTiming &timing, float &weight)
 

Variables

constexpr Vec3 PlayerRig::UP {0.0f, 0.0f, 1.0f}
 
constexpr float PlayerRig::PI = std::numbers::pi_v<float>
 
constexpr float PlayerRig::TWO_PI = 2.0f * PI