Player12
An open source football management simulator
Loading...
Searching...
No Matches
MatchRender3DTuning::Player Struct Referencefinal

#include <match_render_3d_tuning.h>

Static Public Attributes

static constexpr float SCALE = 1.0f
 
static constexpr float REFERENCE_HEIGHT_METRES = 1.80f
 
static constexpr float MIN_HEIGHT_METRES = 1.62f
 
static constexpr float MAX_HEIGHT_METRES = 2.02f
 
static constexpr float HIP_HEIGHT = 0.93f
 
static constexpr float HIP_SPREAD = 0.095f
 
static constexpr float THIGH_LENGTH = 0.46f
 
static constexpr float SHIN_LENGTH = 0.42f
 
static constexpr float THIGH_TOP = 0.088f
 
static constexpr float THIGH_MIDDLE = 0.072f
 
static constexpr float THIGH_BOTTOM = 0.056f
 
static constexpr float CALF_TOP = 0.06f
 
static constexpr float ANKLE_HALF_WIDTH = 0.038f
 
static constexpr float SHORTS_LEG_SHARE = 0.42f
 
static constexpr float SHORTS_LEG_TOP = 0.1f
 
static constexpr float SHORTS_LEG_HEM = 0.094f
 
static constexpr float SOCK_BAND_SHARE = 0.12f
 
static constexpr float BOOT_HALF_LENGTH = 0.13f
 
static constexpr float BOOT_HALF_WIDTH = 0.05f
 
static constexpr float BOOT_HALF_HEIGHT = 0.045f
 
static constexpr float BOOT_TOE_WIDTH = 0.04f
 
static constexpr float BOOT_TOE_HEIGHT = 0.03f
 
static constexpr float BOOT_FORWARD = 0.05f
 
static constexpr float SHORTS_HEIGHT = 0.86f
 
static constexpr float SHORTS_HALF_DEPTH = 0.115f
 
static constexpr float SHORTS_HALF_WIDTH = 0.17f
 
static constexpr float SHORTS_HALF_HEIGHT = 0.13f
 
static constexpr float TORSO_BASE = 0.98f
 
static constexpr float TORSO_LENGTH = 0.52f
 
static constexpr float WAIST_HALF_DEPTH = 0.1f
 
static constexpr float WAIST_HALF_WIDTH = 0.15f
 
static constexpr float CHEST_HALF_DEPTH = 0.11f
 
static constexpr float CHEST_HALF_WIDTH = 0.19f
 
static constexpr float RIB_SHARE = 0.55f
 
static constexpr float RIB_HALF_WIDTH = 0.165f
 
static constexpr float COLLAR_HALF_SIZE = 0.075f
 
static constexpr float COLLAR_HALF_HEIGHT = 0.022f
 
static constexpr float SHOULDER_SPREAD = 0.215f
 
static constexpr float SHOULDER_DROP = 0.05f
 
static constexpr float UPPER_ARM_LENGTH = 0.3f
 
static constexpr float UPPER_ARM_TOP = 0.05f
 
static constexpr float UPPER_ARM_MIDDLE = 0.043f
 
static constexpr float ELBOW_HALF_WIDTH = 0.036f
 
static constexpr float WRIST_HALF_WIDTH = 0.028f
 
static constexpr float SLEEVE_SHARE = 0.55f
 
static constexpr float SLEEVE_HEM = 0.052f
 
static constexpr float FOREARM_LENGTH = 0.27f
 
static constexpr float NECK_LENGTH = 0.19f
 
static constexpr float NECK_HALF_WIDTH = 0.052f
 
static constexpr float HEAD_RADIUS = 0.11f
 
static constexpr float ELBOW_BEND = 0.35f
 
static constexpr float ROUND_MIN_PIXELS = 80.0f
 
static constexpr int TORSO_SIDES = 8
 
static constexpr int LIMB_SIDES = 6
 
static constexpr float SOLE_HALF_HEIGHT = 0.012f
 
static constexpr float STRIDE_BASE_METRES = 1.05f
 
static constexpr float STRIDE_PER_SPEED = 0.36f
 
static constexpr float IDLE_SPEED = 0.35f
 
static constexpr float FULL_STRIDE_SPEED = 8.0f
 
static constexpr float STRIDE_RATE = 7.0f
 
static constexpr float MAX_CYCLES_PER_FRAME = 0.3f
 
static constexpr float TELEPORT_METRES = 12.0f
 
static constexpr float CULL_MARGIN_PIXELS = 80.0f
 
static constexpr float MARKER_MAX_PIXELS = 34.0f
 
static constexpr float MARKER_RADIUS = 0.42f
 
static constexpr std::uint8_t MARKER_ALPHA = 150
 
static constexpr ImU32 SOLE_COLOR = IM_COL32(222, 222, 214, 255)
 
static constexpr float HAND_MIN_PIXELS = 44.0f
 
static constexpr float HAND_HALF_SIZE = 0.045f
 
static constexpr float GLOVE_HALF_SIZE = 0.06f
 

Detailed Description

Low-poly footballer proportions in metres for the 1.80 m reference (top of the head at 1.80 m, shoulders about 0.5 m across the arms); a player is scaled by his real height. Animation is driven by ground speed: stride length grows with speed, the leg phase advances with the distance actually covered on screen, and slow players idle. Swing amplitudes come from the Gait shapes.

Member Data Documentation

◆ ANKLE_HALF_WIDTH

constexpr float MatchRender3DTuning::Player::ANKLE_HALF_WIDTH = 0.038f
staticconstexpr

◆ BOOT_FORWARD

constexpr float MatchRender3DTuning::Player::BOOT_FORWARD = 0.05f
staticconstexpr

◆ BOOT_HALF_HEIGHT

constexpr float MatchRender3DTuning::Player::BOOT_HALF_HEIGHT = 0.045f
staticconstexpr

◆ BOOT_HALF_LENGTH

constexpr float MatchRender3DTuning::Player::BOOT_HALF_LENGTH = 0.13f
staticconstexpr

◆ BOOT_HALF_WIDTH

constexpr float MatchRender3DTuning::Player::BOOT_HALF_WIDTH = 0.05f
staticconstexpr

◆ BOOT_TOE_HEIGHT

constexpr float MatchRender3DTuning::Player::BOOT_TOE_HEIGHT = 0.03f
staticconstexpr

◆ BOOT_TOE_WIDTH

constexpr float MatchRender3DTuning::Player::BOOT_TOE_WIDTH = 0.04f
staticconstexpr

◆ CALF_TOP

constexpr float MatchRender3DTuning::Player::CALF_TOP = 0.06f
staticconstexpr

◆ CHEST_HALF_DEPTH

constexpr float MatchRender3DTuning::Player::CHEST_HALF_DEPTH = 0.11f
staticconstexpr

◆ CHEST_HALF_WIDTH

constexpr float MatchRender3DTuning::Player::CHEST_HALF_WIDTH = 0.19f
staticconstexpr

◆ COLLAR_HALF_HEIGHT

constexpr float MatchRender3DTuning::Player::COLLAR_HALF_HEIGHT = 0.022f
staticconstexpr

◆ COLLAR_HALF_SIZE

constexpr float MatchRender3DTuning::Player::COLLAR_HALF_SIZE = 0.075f
staticconstexpr

◆ CULL_MARGIN_PIXELS

constexpr float MatchRender3DTuning::Player::CULL_MARGIN_PIXELS = 80.0f
staticconstexpr

◆ ELBOW_BEND

constexpr float MatchRender3DTuning::Player::ELBOW_BEND = 0.35f
staticconstexpr

◆ ELBOW_HALF_WIDTH

constexpr float MatchRender3DTuning::Player::ELBOW_HALF_WIDTH = 0.036f
staticconstexpr

◆ FOREARM_LENGTH

constexpr float MatchRender3DTuning::Player::FOREARM_LENGTH = 0.27f
staticconstexpr

◆ FULL_STRIDE_SPEED

constexpr float MatchRender3DTuning::Player::FULL_STRIDE_SPEED = 8.0f
staticconstexpr

◆ GLOVE_HALF_SIZE

constexpr float MatchRender3DTuning::Player::GLOVE_HALF_SIZE = 0.06f
staticconstexpr

◆ HAND_HALF_SIZE

constexpr float MatchRender3DTuning::Player::HAND_HALF_SIZE = 0.045f
staticconstexpr

◆ HAND_MIN_PIXELS

constexpr float MatchRender3DTuning::Player::HAND_MIN_PIXELS = 44.0f
staticconstexpr

Hands (keeper gloves) are only modelled above this projected height.

◆ HEAD_RADIUS

constexpr float MatchRender3DTuning::Player::HEAD_RADIUS = 0.11f
staticconstexpr

◆ HIP_HEIGHT

constexpr float MatchRender3DTuning::Player::HIP_HEIGHT = 0.93f
staticconstexpr

◆ HIP_SPREAD

constexpr float MatchRender3DTuning::Player::HIP_SPREAD = 0.095f
staticconstexpr

◆ IDLE_SPEED

constexpr float MatchRender3DTuning::Player::IDLE_SPEED = 0.35f
staticconstexpr

Below this ground speed (m/s) the legs settle into an idle stance.

◆ LIMB_SIDES

constexpr int MatchRender3DTuning::Player::LIMB_SIDES = 6
staticconstexpr

◆ MARKER_ALPHA

constexpr std::uint8_t MatchRender3DTuning::Player::MARKER_ALPHA = 150
staticconstexpr

◆ MARKER_MAX_PIXELS

constexpr float MatchRender3DTuning::Player::MARKER_MAX_PIXELS = 34.0f
staticconstexpr

Below this projected height a team-coloured disc marks the feet.

◆ MARKER_RADIUS

constexpr float MatchRender3DTuning::Player::MARKER_RADIUS = 0.42f
staticconstexpr

◆ MAX_CYCLES_PER_FRAME

constexpr float MatchRender3DTuning::Player::MAX_CYCLES_PER_FRAME = 0.3f
staticconstexpr

Cap per rendered frame so fast playback never aliases the legs.

◆ MAX_HEIGHT_METRES

constexpr float MatchRender3DTuning::Player::MAX_HEIGHT_METRES = 2.02f
staticconstexpr

◆ MIN_HEIGHT_METRES

constexpr float MatchRender3DTuning::Player::MIN_HEIGHT_METRES = 1.62f
staticconstexpr

◆ NECK_HALF_WIDTH

constexpr float MatchRender3DTuning::Player::NECK_HALF_WIDTH = 0.052f
staticconstexpr

◆ NECK_LENGTH

constexpr float MatchRender3DTuning::Player::NECK_LENGTH = 0.19f
staticconstexpr

◆ REFERENCE_HEIGHT_METRES

constexpr float MatchRender3DTuning::Player::REFERENCE_HEIGHT_METRES = 1.80f
staticconstexpr

◆ RIB_HALF_WIDTH

constexpr float MatchRender3DTuning::Player::RIB_HALF_WIDTH = 0.165f
staticconstexpr

◆ RIB_SHARE

constexpr float MatchRender3DTuning::Player::RIB_SHARE = 0.55f
staticconstexpr

Up close the torso widens through the ribs into the shoulders.

◆ ROUND_MIN_PIXELS

constexpr float MatchRender3DTuning::Player::ROUND_MIN_PIXELS = 80.0f
staticconstexpr

Rounded bodies up close: above this projected height the torso and limbs become prisms (TORSO_SIDES, LIMB_SIDES) instead of boxes.

◆ SCALE

constexpr float MatchRender3DTuning::Player::SCALE = 1.0f
staticconstexpr

◆ SHIN_LENGTH

constexpr float MatchRender3DTuning::Player::SHIN_LENGTH = 0.42f
staticconstexpr

◆ SHORTS_HALF_DEPTH

constexpr float MatchRender3DTuning::Player::SHORTS_HALF_DEPTH = 0.115f
staticconstexpr

◆ SHORTS_HALF_HEIGHT

constexpr float MatchRender3DTuning::Player::SHORTS_HALF_HEIGHT = 0.13f
staticconstexpr

◆ SHORTS_HALF_WIDTH

constexpr float MatchRender3DTuning::Player::SHORTS_HALF_WIDTH = 0.17f
staticconstexpr

◆ SHORTS_HEIGHT

constexpr float MatchRender3DTuning::Player::SHORTS_HEIGHT = 0.86f
staticconstexpr

◆ SHORTS_LEG_HEM

constexpr float MatchRender3DTuning::Player::SHORTS_LEG_HEM = 0.094f
staticconstexpr

◆ SHORTS_LEG_SHARE

constexpr float MatchRender3DTuning::Player::SHORTS_LEG_SHARE = 0.42f
staticconstexpr

Shorts legs cover this share of the thigh and flare at the hem.

◆ SHORTS_LEG_TOP

constexpr float MatchRender3DTuning::Player::SHORTS_LEG_TOP = 0.1f
staticconstexpr

◆ SHOULDER_DROP

constexpr float MatchRender3DTuning::Player::SHOULDER_DROP = 0.05f
staticconstexpr

◆ SHOULDER_SPREAD

constexpr float MatchRender3DTuning::Player::SHOULDER_SPREAD = 0.215f
staticconstexpr

◆ SLEEVE_HEM

constexpr float MatchRender3DTuning::Player::SLEEVE_HEM = 0.052f
staticconstexpr

◆ SLEEVE_SHARE

constexpr float MatchRender3DTuning::Player::SLEEVE_SHARE = 0.55f
staticconstexpr

Short sleeves end this share of the way to the elbow.

◆ SOCK_BAND_SHARE

constexpr float MatchRender3DTuning::Player::SOCK_BAND_SHARE = 0.12f
staticconstexpr

The turned-down sock band ends this share of the way to the ankle.

◆ SOLE_COLOR

constexpr ImU32 MatchRender3DTuning::Player::SOLE_COLOR = IM_COL32(222, 222, 214, 255)
staticconstexpr

◆ SOLE_HALF_HEIGHT

constexpr float MatchRender3DTuning::Player::SOLE_HALF_HEIGHT = 0.012f
staticconstexpr

The sole under the boot, seen on raised feet up close.

◆ STRIDE_BASE_METRES

constexpr float MatchRender3DTuning::Player::STRIDE_BASE_METRES = 1.05f
staticconstexpr

One stride cycle (two steps) covers BASE + PER_SPEED * speed metres: ~1.55 m walking, ~2.5 m jogging, ~3.75 m sprinting (0.9-2 cycles/s).

◆ STRIDE_PER_SPEED

constexpr float MatchRender3DTuning::Player::STRIDE_PER_SPEED = 0.36f
staticconstexpr

◆ STRIDE_RATE

constexpr float MatchRender3DTuning::Player::STRIDE_RATE = 7.0f
staticconstexpr

◆ TELEPORT_METRES

constexpr float MatchRender3DTuning::Player::TELEPORT_METRES = 12.0f
staticconstexpr

◆ THIGH_BOTTOM

constexpr float MatchRender3DTuning::Player::THIGH_BOTTOM = 0.056f
staticconstexpr

◆ THIGH_LENGTH

constexpr float MatchRender3DTuning::Player::THIGH_LENGTH = 0.46f
staticconstexpr

◆ THIGH_MIDDLE

constexpr float MatchRender3DTuning::Player::THIGH_MIDDLE = 0.072f
staticconstexpr

◆ THIGH_TOP

constexpr float MatchRender3DTuning::Player::THIGH_TOP = 0.088f
staticconstexpr

Tapered limbs (half widths, metres): thighs narrow from the hip to the knee, calves swell below the knee and thin to the ankle, arms thin from the shoulder to the wrist.

◆ TORSO_BASE

constexpr float MatchRender3DTuning::Player::TORSO_BASE = 0.98f
staticconstexpr

◆ TORSO_LENGTH

constexpr float MatchRender3DTuning::Player::TORSO_LENGTH = 0.52f
staticconstexpr

◆ TORSO_SIDES

constexpr int MatchRender3DTuning::Player::TORSO_SIDES = 8
staticconstexpr

◆ UPPER_ARM_LENGTH

constexpr float MatchRender3DTuning::Player::UPPER_ARM_LENGTH = 0.3f
staticconstexpr

◆ UPPER_ARM_MIDDLE

constexpr float MatchRender3DTuning::Player::UPPER_ARM_MIDDLE = 0.043f
staticconstexpr

◆ UPPER_ARM_TOP

constexpr float MatchRender3DTuning::Player::UPPER_ARM_TOP = 0.05f
staticconstexpr

◆ WAIST_HALF_DEPTH

constexpr float MatchRender3DTuning::Player::WAIST_HALF_DEPTH = 0.1f
staticconstexpr

◆ WAIST_HALF_WIDTH

constexpr float MatchRender3DTuning::Player::WAIST_HALF_WIDTH = 0.15f
staticconstexpr

◆ WRIST_HALF_WIDTH

constexpr float MatchRender3DTuning::Player::WRIST_HALF_WIDTH = 0.028f
staticconstexpr

The documentation for this struct was generated from the following file: