group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
ViewmodelConfig.hpp File Reference

Per-weapon viewmodel, third-person, and recoil tuning parameters (header-only). More...

#include "ecs/components/Projectile.hpp"
#include "ecs/components/WeaponHoldPose.hpp"
#include <array>
#include <cstddef>
#include <glm/vec3.hpp>
Include dependency graph for ViewmodelConfig.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ViewmodelParams
 First-person viewmodel positioning/rotation params per weapon type. More...
struct  ThirdPersonWeaponParams
 Per-weapon procedural-overlay + scale params for the third-person body. More...
struct  HandMountPoint
 A weapon-local grip point for either hand. More...
struct  FirstPersonArmMountSet
 First-person arm controls, independent from third-person weapon grips. More...
struct  FirstPersonHandMountParams
 Per-weapon first-person shoulder/elbow/palm/finger target data. More...
struct  WeaponSpawnerModelParams
 World weapon spawner model params. More...
struct  WeaponModelInfo
 Asset filename + load flags for a weapon model. More...
struct  RecoilParams
 Visual recoil params per weapon type (viewmodel-only, does not affect aim). More...

Functions

const ViewmodelParamsgetViewmodelParams (WeaponType type)
 Returns viewmodel positioning params for a weapon type.
const ThirdPersonWeaponParamsgetThirdPersonWeaponParams (WeaponType type)
 Returns third-person procedural/scale params for a weapon type.
const WeaponHoldPosegetWeaponHoldPose (WeaponType type)
 Returns the default third-person FK hold pose for a weapon type.
const FirstPersonHandMountParamsgetFirstPersonHandMountParams (WeaponType type)
 Returns first-person-only arm controls for a weapon type.
const WeaponSpawnerModelParamsgetWeaponSpawnerModelParams (WeaponType type)
 Returns world weapon pickup/spawner model params for a weapon type.
WeaponModelInfo getWeaponModelInfo (WeaponType type)
 Returns the GLB filename and load flags for a weapon type.
const RecoilParamsgetRecoilParams (WeaponType type)
 Returns visual recoil params for a weapon type.

Variables

constexpr std::size_t kHandFingerMountCount = 5
constexpr std::array< const char *, kHandFingerMountCountkHandFingerMountNames

Detailed Description

Per-weapon viewmodel, third-person, and recoil tuning parameters (header-only).

Function Documentation

◆ getFirstPersonHandMountParams()

const FirstPersonHandMountParams & getFirstPersonHandMountParams ( WeaponType type)
inline

Returns first-person-only arm controls for a weapon type.

Here is the caller graph for this function:

◆ getRecoilParams()

const RecoilParams & getRecoilParams ( WeaponType type)
inline

Returns visual recoil params for a weapon type.

Here is the caller graph for this function:

◆ getThirdPersonWeaponParams()

const ThirdPersonWeaponParams & getThirdPersonWeaponParams ( WeaponType type)
inline

Returns third-person procedural/scale params for a weapon type.

Here is the caller graph for this function:

◆ getViewmodelParams()

const ViewmodelParams & getViewmodelParams ( WeaponType type)
inline

Returns viewmodel positioning params for a weapon type.

Here is the caller graph for this function:

◆ getWeaponHoldPose()

const WeaponHoldPose & getWeaponHoldPose ( WeaponType type)
inline

Returns the default third-person FK hold pose for a weapon type.

These are compile-time fallbacks; at runtime each weapon's pose is loaded from assets/weapons/<name>.hold.toml if present and live-tuned via the Weapon Hold tweaker (which saves back to that TOML).

Per-weapon hold poses hand-tuned in-game via the Weapon Hold tweaker (spine-relative gun placement + scale + 3-DOF FK arm/finger angles), exported from each weapon's <name>.hold.toml. Finger curl is shared across weapons; the offset, scale, and arm bone angles differ per weapon. Runtime overrides still come from assets/weapons/<name>.hold.toml.

Here is the caller graph for this function:

◆ getWeaponModelInfo()

WeaponModelInfo getWeaponModelInfo ( WeaponType type)
inline

Returns the GLB filename and load flags for a weapon type.

◆ getWeaponSpawnerModelParams()

const WeaponSpawnerModelParams & getWeaponSpawnerModelParams ( WeaponType type)
inline

Returns world weapon pickup/spawner model params for a weapon type.

Variable Documentation

◆ kHandFingerMountCount

std::size_t kHandFingerMountCount = 5
inlineconstexpr

◆ kHandFingerMountNames

std::array<const char*, kHandFingerMountCount> kHandFingerMountNames
inlineconstexpr
Initial value:
{
"Thumb", "Index", "Middle", "Ring", "Pinky"}