载入中...
搜索中...
未找到
UpperBodyOrientationCompensator.cpp
浏览该文件的文档.
40UpperBodyOrientationCompensator::UpperBodyOrientationCompensator(const AnimSkeleton& skeleton) noexcept
43Result<void> UpperBodyOrientationCompensator::configure(const UpperBodyOrientationProfile& profile) {
47 if (root < 0) return profileError("upper-body orientation root bone was not found", "profile.rootBone");
48 if (hips < 0) return profileError("upper-body orientation hips bone was not found", "profile.hipsBone");
49 if (spine < 0) return profileError("upper-body orientation spine bone was not found", "profile.spineBone");
51 return profileError("upper-body orientation hips bone must descend from root", "profile.hipsBone");
67Result<void> UpperBodyOrientationCompensator::apply(AnimPose& pose, AnimPose& upperBodyPose, float weight) const {
Root-relative upper-body orientation correction.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
static Status success(StatusCode code=StatusCode::Ok)
Construct a successful status with an explicit non-error outcome.
Definition Status.cpp:19
Evaluated local (and optional world) pose for an AnimSkeleton. Script type: AnimPose.
Definition AnimPose.h:17
void computeWorld(const AnimSkeleton *skeleton)
Compute world transforms from local pose + skeleton hierarchy. World values readable via getWorld* af...
Definition AnimPose.cpp:207
3D bone hierarchy + bind-pose local TRS for skeletal animation. Independent of ik::Skeleton3D (FABRIK...
Definition AnimSkeleton.h:16
Result< void > configure(const UpperBodyOrientationProfile &profile)
Transactionally replace the resolved profile.
Definition UpperBodyOrientationCompensator.cpp:43
Result< void > apply(AnimPose &pose, AnimPose &upperBodyPose, float weight) const
Blend the sampled upper-body spine orientation into an accumulated pose.
Definition UpperBodyOrientationCompensator.cpp:67
UpperBodyOrientationCompensator(const AnimSkeleton &skeleton) noexcept
Construct over a skeleton that must outlive this object.
Definition UpperBodyOrientationCompensator.cpp:40
Definition Animation.cpp:58
void slerpQuat(float ax, float ay, float az, float aw, float bx, float by, float bz, float bw, float t, float &ox, float &oy, float &oz, float &ow)
Slerp quat.
Definition AnimMath.h:43
@ InvalidArgument
@ Unsupported
@ NoOp
@ Applied
Local TRS used by skeletal animation (quaternion xyzw).
Definition AnimMath.h:9
Stable bone-name profile used to prepare upper-body orientation compensation.
Definition UpperBodyOrientationCompensator.h:16
std::string hipsBone
Definition UpperBodyOrientationCompensator.h:18
std::string rootBone
Definition UpperBodyOrientationCompensator.h:17
std::string spineBone
Definition UpperBodyOrientationCompensator.h:19