Resolves a bone profile once and corrects an upper-body pose against locomotion orientation. 更多...
#include <UpperBodyOrientationCompensator.h>
Public 成员函数 | |
| UpperBodyOrientationCompensator (const AnimSkeleton &skeleton) noexcept | |
| Construct over a skeleton that must outlive this object. | |
| Result< void > | configure (const UpperBodyOrientationProfile &profile) |
| Transactionally replace the resolved profile. | |
| void | clear () noexcept |
| Clear the resolved profile. | |
| bool | isConfigured () const noexcept |
| Whether a validated profile is currently published. | |
| Result< void > | apply (AnimPose &pose, AnimPose &upperBodyPose, float weight) const |
| Blend the sampled upper-body spine orientation into an accumulated pose. | |
详细描述
Resolves a bone profile once and corrects an upper-body pose against locomotion orientation.
The compensator borrows one immutable skeleton for its whole lifetime. configure() resolves names into coordinator-local indices and publishes them only after every invariant succeeds; it never retains strings, masks, poses, or provider objects. apply() is owner-thread-only, deterministic for identical inputs, and retains no pose references after the synchronous call.
在文件 UpperBodyOrientationCompensator.h 第 30 行定义.
构造及析构函数说明
◆ UpperBodyOrientationCompensator()
|
explicitnoexcept |
Construct over a skeleton that must outlive this object.
在文件 UpperBodyOrientationCompensator.cpp 第 40 行定义.
成员函数说明
◆ apply()
| Result< void > eve::animation::UpperBodyOrientationCompensator::apply | ( | AnimPose & | pose, |
| AnimPose & | upperBodyPose, | ||
| float | weight | ||
| ) | const |
Blend the sampled upper-body spine orientation into an accumulated pose.
- 参数
-
pose Accumulated pose mutated synchronously; world transforms are refreshed before return. upperBodyPose Sampled upper-body pose whose spine orientation is interpreted relative to its root. weight Finite blend influence in [0,1].
- 返回
- Applied/NoOp, or InvalidArgument without mutation for incompatible poses or weight.
在文件 UpperBodyOrientationCompensator.cpp 第 67 行定义.
引用了 eve::Applied, eve::animation::AnimPose::computeWorld(), eve::Diagnostic::error(), eve::Result< T >::failure(), eve::animation::AnimSkeleton::getBoneCount(), eve::animation::AnimPose::getBoneCount(), eve::NoOp, eve::animation::TransformTRS::normalizeRotation(), pose, eve::animation::TransformTRS::qw, eve::animation::TransformTRS::qx, eve::animation::TransformTRS::qy, eve::animation::TransformTRS::qz, rotation, eve::animation::slerpQuat(), eve::Status::success(), eve::Result< T >::success(), eve::Unsupported, weight , 以及 eve::animation::AnimPose::world().
◆ clear()
|
noexcept |
Clear the resolved profile.
在文件 UpperBodyOrientationCompensator.cpp 第 62 行定义.
被这些函数引用 eve::animation::MontageCoordinator::clearUpperBodyOrientation().
◆ configure()
| Result< void > eve::animation::UpperBodyOrientationCompensator::configure | ( | const UpperBodyOrientationProfile & | profile | ) |
Transactionally replace the resolved profile.
- 返回
- Applied on success; InvalidArgument when a named bone is missing or the hierarchy is invalid.
在文件 UpperBodyOrientationCompensator.cpp 第 43 行定义.
引用了 eve::Applied, eve::animation::AnimSkeleton::findBone(), eve::animation::AnimSkeleton::getParent(), eve::animation::UpperBodyOrientationProfile::hipsBone, root, eve::animation::UpperBodyOrientationProfile::rootBone, eve::animation::UpperBodyOrientationProfile::spineBone, eve::Status::success() , 以及 eve::Result< T >::success().
被这些函数引用 eve::animation::MontageCoordinator::configureUpperBodyOrientation().
◆ isConfigured()
|
inlinenoexcept |
Whether a validated profile is currently published.
在文件 UpperBodyOrientationCompensator.h 第 43 行定义.
该类的文档由以下文件生成:
- src/modules/animation/UpperBodyOrientationCompensator.h
- src/modules/animation/UpperBodyOrientationCompensator.cpp