|
resonance 1.0.1
|
One keyframe of the rotation channel. More...
#include <transanim.h>

Public Member Functions | |
| void | ComputeSplineTangents (const RotKey *pPrev, const RotKey *pNext) |
| Build the two Kochanek-Bartels tangents of this keyframe from its neighbours. | |
| void | EvaluateSpline (const RotKey *pNext, Quat &out, float flT) const |
| Evaluate the spherical Bezier segment from this keyframe to pNext. | |
| bool | operator< (const RotKey &other) const |
| Order keyframes by frame. | |
Public Attributes | |
| Quat | mQuat |
| Quat | mTangentIn |
| Quat | mTangentOut |
| float | mShape [kXfmRowFloatCount] |
| float | mFrame |
One keyframe of the rotation channel.
The same 0x50 bytes as TransKey, and the same node placement. The value is a quaternion rather than a vector, so all four floats are read, written, and dumped. The dumper at 0x004f9160 labels the value "q:" and its components "x:", "y:", "z:", and "w:".
Build the two Kochanek-Bartels tangents of this keyframe from its neighbours.
Every blend is a QuatSlerp(). With both neighbours present, toPrev is the slerp of this key towards pPrev at -(bias + 1) / 3 and toNext the slerp towards pNext at (1 - bias) / 3. mTangentOut is then the slerp of this key towards the slerp of that pair at (1 - continuity) / 2, weighted 1 - tension, and mTangentIn the same with (1 + continuity) / 2 and tension - 1. The two end weights differ only in sign, which is what opposes the two tangents. A keyframe with no previous neighbour writes only mTangentOut, as the slerp towards pNext at (1 - tension) * (continuity * bias + 1) / 3, and one with no next neighbour writes only mTangentIn, as the slerp towards pPrev at (1 - tension) * (1 - continuity * bias) / 3. A keyframe with neither neighbour is unchanged.
| pPrev | The preceding keyframe, or null at the start of the channel. |
| pNext | The following keyframe, or null at the end of the channel. |
Evaluate the spherical Bezier segment from this keyframe to pNext.
The control points are mQuat, mTangentOut, pNext->mTangentIn, and pNext->mQuat. Three rounds of QuatSlerp() at the one parameter reduce the four points to three, then two, then the result. A parameter of exactly zero or exactly one copies the matching end quaternion.
| pNext | The keyframe that ends the segment. |
| out | Receives the rotation. |
| flT | The segment parameter, zero at this keyframe and one at pNext. |
|
inline |
Order keyframes by frame.
The list sort at 0x00108a50, which TnlBumpFX::Start() and the loader call, inlines it in its merge step at 0x001088e0.
| other | The keyframe to compare against. |
| Quat Rnd::TransAnim::RotKey::mQuat |
The rotation. +0x00
| Quat Rnd::TransAnim::RotKey::mTangentIn |
Tangent entering the key. +0x10
| Quat Rnd::TransAnim::RotKey::mTangentOut |
Tangent leaving the key. +0x20
| float Rnd::TransAnim::RotKey::mShape[kXfmRowFloatCount] |
See ShapeComponent, then padding. +0x30
| float Rnd::TransAnim::RotKey::mFrame |
Frame this key lands on. +0x40