Ordered main-thread post-process stack with aim, limb IK and foot planting. 更多...
#include <AnimConstraintStack.h>
Public 成员函数 | |
| AnimConstraintStack (AnimSkeleton *skeleton) | |
| Construct for a non-null borrowed skeleton. | |
| AnimConstraintStack (const AnimConstraintStack &)=default | |
| Anim constraint stack. | |
| AnimConstraintStack & | operator= (const AnimConstraintStack &)=default |
| Operator =. | |
| void | setSkeleton (AnimSkeleton *skeleton) |
| Rebind the borrowed skeleton; changing it clears old index constraints. | |
| AnimSkeleton * | getSkeleton () const |
| Return the borrowed skeleton, or null after explicit unbinding. @ownership Borrowed; ownership remains with the animation source. @lifetime Valid until setSkeleton(), skeleton destruction, or stack destruction. | |
| void | clear () |
| Remove all constraints. | |
| int | getCount () const |
| Return constraint count. | |
| void | addAim (int bone, float targetX, float targetY, float targetZ, float weight=1.f) |
| Append a weighted bone aim constraint. | |
| void | addTwoBoneIK (int root, int mid, int tip, float targetX, float targetY, float targetZ, float weight=1.f) |
| Append a weighted two-bone IK constraint. | |
| void | addFootIK (int hip, int knee, int foot, float groundY, float normalX=0.f, float normalY=1.f, float normalZ=0.f, float soleOffset=0.f, float weight=1.f) |
| Plant a foot at groundY + soleOffset and orient its local +Z toward the ground normal. | |
| void | apply (AnimPose *pose) const |
| Apply constraints in insertion order and refresh world transforms. Main-thread only. | |
详细描述
Ordered main-thread post-process stack with aim, limb IK and foot planting.
The skeleton is borrowed and must outlive the stack. Targets are owning values.
在文件 AnimConstraintStack.h 第 17 行定义.
构造及析构函数说明
◆ AnimConstraintStack() [1/2]
|
explicit |
Construct for a non-null borrowed skeleton.
在文件 AnimConstraintStack.cpp 第 11 行定义.
◆ AnimConstraintStack() [2/2]
|
default |
Anim constraint stack.
成员函数说明
◆ addAim()
| void eve::animation::AnimConstraintStack::addAim | ( | int | bone, |
| float | targetX, | ||
| float | targetY, | ||
| float | targetZ, | ||
| float | weight = 1.f |
||
| ) |
Append a weighted bone aim constraint.
在文件 AnimConstraintStack.cpp 第 21 行定义.
引用了 bone, eve::animation::clampf(), targetX , 以及 weight.
◆ addFootIK()
| void eve::animation::AnimConstraintStack::addFootIK | ( | int | hip, |
| int | knee, | ||
| int | foot, | ||
| float | groundY, | ||
| float | normalX = 0.f, |
||
| float | normalY = 1.f, |
||
| float | normalZ = 0.f, |
||
| float | soleOffset = 0.f, |
||
| float | weight = 1.f |
||
| ) |
Plant a foot at groundY + soleOffset and orient its local +Z toward the ground normal.
在文件 AnimConstraintStack.cpp 第 32 行定义.
引用了 eve::animation::clampf(), length , 以及 weight.
◆ addTwoBoneIK()
| void eve::animation::AnimConstraintStack::addTwoBoneIK | ( | int | root, |
| int | mid, | ||
| int | tip, | ||
| float | targetX, | ||
| float | targetY, | ||
| float | targetZ, | ||
| float | weight = 1.f |
||
| ) |
Append a weighted two-bone IK constraint.
在文件 AnimConstraintStack.cpp 第 26 行定义.
引用了 eve::animation::clampf(), mid, root, targetX, tip , 以及 weight.
被这些函数引用 eve::climbing::applyClimbingPose().
◆ apply()
| void eve::animation::AnimConstraintStack::apply | ( | AnimPose * | pose | ) | const |
Apply constraints in insertion order and refresh world transforms. Main-thread only.
在文件 AnimConstraintStack.cpp 第 40 行定义.
引用了 pose, eve::animation::TransformTRS::px, eve::animation::TransformTRS::py , 以及 eve::animation::TransformTRS::pz.
被这些函数引用 eve::climbing::applyClimbingPose().
◆ clear()
|
inline |
◆ getCount()
|
inline |
Return constraint count.
在文件 AnimConstraintStack.h 第 38 行定义.
◆ getSkeleton()
|
inline |
Return the borrowed skeleton, or null after explicit unbinding. @ownership Borrowed; ownership remains with the animation source. @lifetime Valid until setSkeleton(), skeleton destruction, or stack destruction.
在文件 AnimConstraintStack.h 第 33 行定义.
◆ operator=()
|
default |
Operator =.
◆ setSkeleton()
| void eve::animation::AnimConstraintStack::setSkeleton | ( | AnimSkeleton * | skeleton | ) |
Rebind the borrowed skeleton; changing it clears old index constraints.
在文件 AnimConstraintStack.cpp 第 15 行定义.
引用了 clear().
该类的文档由以下文件生成:
- src/modules/animation/AnimConstraintStack.h
- src/modules/animation/AnimConstraintStack.cpp