|
group2 0.1.0
CSE 125 Group 2
|
TOML loader/saver for per-weapon hand grip poses (pitch+yaw schema). More...
#include "ecs/components/GripPose.hpp"#include <SDL3/SDL_log.h>#include <array>#include <cstdio>#include <filesystem>#include <fstream>#include <toml++/toml.hpp>Functions | |
| bool | loadWeaponGripPose (const std::string &path, WeaponGripPose &out) |
| Load a weapon grip pose from a TOML side-table. | |
| bool | saveWeaponGripPoseToml (const std::string &path, const WeaponGripPose &pose, bool rightHandValid, bool leftHandValid) |
| Save a grip pose back to a TOML file. | |
TOML loader/saver for per-weapon hand grip poses (pitch+yaw schema).
| bool loadWeaponGripPose | ( | const std::string & | path, |
| WeaponGripPose & | out ) |
Load a weapon grip pose from a TOML side-table.
File format (pitch / yaw degrees per joint):
| bool saveWeaponGripPoseToml | ( | const std::string & | path, |
| const WeaponGripPose & | pose, | ||
| bool | rightHandValid, | ||
| bool | leftHandValid ) |
Save a grip pose back to a TOML file.
Writes the same shape the loader expects. Sections for a hand are omitted when the matching hand is invalid (so a single-hand TOML round-trips correctly). Returns false on filesystem failure; the caller is expected to log appropriately.