载入中...
搜索中...
未找到
UpperBodyOrientationCompensator.h
浏览该文件的文档.
1#pragma once
2
6#include "common/Export.h"
7#include "common/Result.h"
8
9#include <string>
10
11namespace eve::animation {
12
13class AnimSkeleton;
14
17 std::string rootBone;
18 std::string hipsBone;
19 std::string spineBone;
20};
21
31public:
33 explicit UpperBodyOrientationCompensator(const AnimSkeleton& skeleton) noexcept;
34
39 [[nodiscard]] Result<void> configure(const UpperBodyOrientationProfile& profile);
41 void clear() noexcept;
43 [[nodiscard]] bool isConfigured() const noexcept { return configured_; }
44
52 [[nodiscard]] Result<void> apply(AnimPose& pose, AnimPose& upperBodyPose, float weight) const;
53
54private:
55 const AnimSkeleton& skeleton_;
56 int rootBone_ = -1;
57 int hipsBone_ = -1;
58 int spineBone_ = -1;
59 bool configured_ = false;
60};
61
62} // namespace eve::animation
eve::EntitySpatialPose pose
#define EVENGINE_API_WORLD
Definition Export.h:109
Move-only, checked operation results for the common layer.
double weight
Move-only operation result carrying either a value or Status.
Definition Result.h:176
Evaluated local (and optional world) pose for an AnimSkeleton. Script type: AnimPose.
Definition AnimPose.h:17
3D bone hierarchy + bind-pose local TRS for skeletal animation. Independent of ik::Skeleton3D (FABRIK...
Resolves a bone profile once and corrects an upper-body pose against locomotion orientation.
bool isConfigured() const noexcept
Whether a validated profile is currently published.
Stable bone-name profile used to prepare upper-body orientation compensation.