QtCraft API C++ classes QML types Handbook

QcAnimator::BodyPose Struct

struct QcAnimator::BodyPose

The rotations of a skeleton model's bones and of its whole body in one frame. More...

Header: #include <clientcore/figures/QcAnimator.h>

Public Functions

void aimBow(const QcEntityPose &pose)
QcAnimator::BoneRotation &bone(QcBoneRole role)
const QcAnimator::BoneRotation &bone(QcBoneRole role) const
QcVec3 leaned(QcBoneRole role, const QcVec3 &bonePivot, const QcVec3 &point) const
void lieOnBack(double idle)
void rowBoat(double rowPhase)
void sneak()

Public Variables

bool armsAimed
double bodyBack
double bodyLift
double bodyPitch
QcVec3 bodyPivot
double bodyRoll
std::array<QcAnimator::BoneRotation, 7> bones
double capeLift
double capeSway
double torsoPitch
QcVec3 torsoPivot

Detailed Description

Member Function Documentation

void BodyPose::aimBow(const QcEntityPose &pose)

Aiming a bow (decisions E-425, E-984): both arms point along the view of pose, turned with the head; the right one holds the bow out in its fist, the left one reaches across the chest to the string.

QcAnimator::BoneRotation &BodyPose::bone(QcBoneRole role)

Returns the rotation of the bone role.

const QcAnimator::BoneRotation &BodyPose::bone(QcBoneRole role) const

Returns the rotation of the bone role, read-only.

QcVec3 BodyPose::leaned(QcBoneRole role, const QcVec3 &bonePivot, const QcVec3 &point) const

Returns point of the bone role, already turned by the bone's own rotation around its pivot bonePivot, carried along by the lean of the upper body (torsoPitch): torso and arms turn with it, the head (and aiming arms, armsAimed) only moves with its pivot and keeps its rotation; the legs and bones without a role stay where they are.

void BodyPose::lieOnBack(double idle)

On the back around a point just above the feet, the limbs straight, the head on the pillow; only the breath (idle) moves the arms.

void BodyPose::rowBoat(double rowPhase)

Driving a boat (decision E-920): the thighs level and forward, the arms reaching to the grips of the paddles at the moment rowPhase of a stroke (negative: resting paddles).

void BodyPose::sneak()

Sneaking on the ground (decision E-965): the upper body leans forward by sneakLean around the hips, the figure moves back by sneakBack and down by sneakDrop.

Member Variable Documentation

bool BodyPose::armsAimed

The arms aim (a drawn bow): like the head they ride on the leaning torso without turning with it, so they keep pointing along the view.

std::array<QcAnimator::BoneRotation, 7> BodyPose::bones

Indexed by QcBoneRole.