15#include <glm/gtc/quaternion.hpp>
165 [[nodiscard]]
int numJoints() const noexcept;
197 [[nodiscard]] const
std::vector<glm::mat4>&
skinMatrices() const noexcept;
227 const glm::quat& orientationFix,
float bindMeshMinY);
PR-27 — per-entity animation state snapshot, decoupled from CharacterAnimator.
Catalog of ozz animation clips shared across all animated entities.
ClipId
Enumerated clip IDs.
Definition AnimationLibrary.hpp:21
@ _Count
Sentinel; also used as "no clip / no override".
Definition AnimationLibrary.hpp:57
@ Idle
Definition AnimationLibrary.hpp:22
float computeIdleGroundedMinY(const CharacterRig &rig, const AnimationLibrary &library, const glm::quat &orientationFix, float bindMeshMinY)
Grounding reference that aligns the IDLE pose's feet with the floor.
Definition CharacterAnimator.cpp:1286
static constexpr size_t kHandFingerIkCount
Number of fingers per hand.
Definition CharacterAnimator.hpp:66
static constexpr size_t kNumSamplerSlots
Number of sampler slots available for the per-frame blend.
Definition CharacterAnimator.hpp:52
Shared skinned-character rig: skeleton, bind-pose mesh, skin weights.
Authored per-weapon hand grip poses (Phase C of the AAA IK overhaul).
Pluggable skinning interface — phase-1 CPU LBS; GPU backend slots in later.
Authored per-weapon third-person hold pose (FK weapon-hold rewrite).
Collection of animation clips loaded on top of a shared skeleton.
Definition AnimationLibrary.hpp:75
std::unique_ptr< Impl > impl_
Definition CharacterAnimator.hpp:210
void applyRecoilImpulse(float strengthRad)
Phase F additive recoil kick.
Definition CharacterAnimator.cpp:498
void applyWeaponHoldPose(const WeaponHoldPose &pose, float weight)
Pose both arms (and the gun-holding fingers) for a held weapon.
Definition CharacterAnimator.cpp:507
void setSkinningBackend(const ISkinningBackend *backend)
Set the skinning backend (non-owning).
Definition CharacterAnimator.cpp:470
void setDebugPlaybackSpeed(float mul) noexcept
Playback-speed multiplier applied in debug-override mode.
Definition CharacterAnimator.cpp:493
void renderFromServer(const AnimSnapshot &serverState, const AnimationInputs &inputs)
PR-29: render the entity at server-authoritative animation state.
Definition CharacterAnimator.cpp:994
ClipId debugOverride() const noexcept
Current debug override clip (_Count = no override).
Definition CharacterAnimator.cpp:483
const std::array< ClipSampler, kNumSamplerSlots > & samplers() const noexcept
Snapshot of the current sampler slots (for UI inspection).
Definition CharacterAnimator.cpp:488
CharacterAnimator(CharacterAnimator &&) noexcept=delete
void runSamplingAndSkinning(const AnimationInputs &inputs)
PR-29: shared back end for update() and renderFromServer().
Definition CharacterAnimator.cpp:1053
CharacterAnimator(const CharacterRig &rig, const AnimationLibrary &library)
Definition CharacterAnimator.cpp:343
int numJoints() const noexcept
Number of joints in the underlying rig.
Definition CharacterAnimator.cpp:590
CharacterAnimator(const CharacterAnimator &)=delete
const std::vector< glm::mat4 > & skinMatrices() const noexcept
Per-joint LBS skin matrices: procedural * modelMat * inverseBind.
Definition CharacterAnimator.cpp:610
void computeSkinnedVertices(std::vector< std::vector< ModelVertex > > &out) const
Apply CPU skinning to every rig mesh, producing animated vertices.
Definition CharacterAnimator.cpp:1273
void update(const AnimationInputs &inputs, float dt)
Advance the state machine, sample + blend, and compute skin matrices.
Definition CharacterAnimator.cpp:687
int currentModeValue() const noexcept
Current high-level animator mode as the underlying int of the private Mode enum (0 = Locomotion,...
Definition CharacterAnimator.cpp:595
void setFrozen(bool frozen) noexcept
Freeze animation playback.
Definition CharacterAnimator.cpp:600
void updateSkinMatrices()
Recompute skinMatrices() = jointModelMats * inverseBindMats.
Definition CharacterAnimator.cpp:580
void setDebugOverride(ClipId id, bool loop=true)
Force a single clip to play, bypassing the graph.
Definition CharacterAnimator.cpp:475
const std::vector< glm::mat4 > & jointModelMatrices() const noexcept
Model-space joint matrices with all procedural transforms applied (head pitch, wallrun mirror) but WI...
Definition CharacterAnimator.cpp:605
CharacterAnimator & operator=(const CharacterAnimator &)=delete
Shared skinned rig — skeleton + bind-pose meshes + joint map.
Definition CharacterRig.hpp:45
Abstract skinning backend.
Definition SkinningBackend.hpp:20
Definition AudioRuntime.hpp:365
Snapshot of an entity's full animation state at one instant.
Definition AnimSnapshot.hpp:73
Definition CharacterAnimator.cpp:242
One active sampler slot contributing to the per-frame blend.
Definition CharacterAnimator.hpp:56
bool active
False = slot unused this frame.
Definition CharacterAnimator.hpp:61
float playbackSpeed
Multiplier applied to clip duration when advancing.
Definition CharacterAnimator.hpp:59
float weight
Blend weight; slots with weight 0 are skipped.
Definition CharacterAnimator.hpp:60
float timeRatio
Normalised playback time ∈ [0, 1].
Definition CharacterAnimator.hpp:58
One vertex in a skinned bind-pose mesh.
Definition SkinVertex.hpp:17
Authored per-weapon third-person hold pose (see file header).
Definition WeaponHoldPose.hpp:57