group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
GripPose Struct Reference

Authored local-space finger angles describing how a hand wraps a weapon. More...

#include <GripPose.hpp>

Static Public Member Functions

static constexpr std::size_t index (std::size_t finger, std::size_t joint) noexcept
 Helper: index into jointAngles for (finger, joint).

Public Attributes

std::array< glm::vec2, kGripPoseJointCountjointAngles {}
 (pitch, yaw) in degrees per joint. .x = pitch (curl), .y = yaw (splay).

Detailed Description

Authored local-space finger angles describing how a hand wraps a weapon.

Order: thumb[0..3], index[0..3], middle[0..3], ring[0..3], pinky[0..3]. Each entry is a (pitch, yaw) pair in DEGREES, applied in the bone's parent-local frame:

  • pitch (the x component) = curl angle around the Mixamo Z axis, positive = bend toward the palm (curl into a fist).
  • yaw (the y component) = splay angle around the Mixamo Y axis, positive = spread away from the neighbour finger. There is no roll DOF — fingers cannot physically twist about their own length. This 2-DOF parameterization keeps the authored data biomechanically valid by construction: there's no slider that would let an editor produce an impossible finger pose.

CharacterAnimator builds a local-space quaternion qYaw * qPitch from these angles per joint, then slerps the animated finger pose toward this target by holdWeight so idle-clip fingers smoothly transition to the authored grip whenever a weapon is held.

Member Function Documentation

◆ index()

constexpr std::size_t GripPose::index ( std::size_t finger,
std::size_t joint )
inlinestaticnodiscardconstexprnoexcept

Helper: index into jointAngles for (finger, joint).

Parameters
finger0=thumb, 1=index, 2=middle, 3=ring, 4=pinky.
joint0..3 (root to tip).
Here is the caller graph for this function:

Member Data Documentation

◆ jointAngles

std::array<glm::vec2, kGripPoseJointCount> GripPose::jointAngles {}

(pitch, yaw) in degrees per joint. .x = pitch (curl), .y = yaw (splay).


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