Finite-duration pose transition relative to a continuously sampled target. 更多...
#include <AnimInertializer.h>
类 | |
| struct | Impl |
Public 成员函数 | |
| AnimInertializer () | |
| Construct an empty, independently owned transition. | |
| ~AnimInertializer () | |
| Release owned samples; no external objects are accessed. | |
| AnimInertializer (const AnimInertializer &)=delete | |
| AnimInertializer & | operator= (const AnimInertializer &)=delete |
| eve::Result< void > | begin (const AnimPose &source, const AnimPose &previousSource, const AnimPose &target, const AnimPose &previousTarget, float historySeconds, float durationSeconds, std::span< const float > boneTimeFactors={}) |
| Atomically begin or interrupt a transition using actual outgoing pose history. | |
| eve::Result< void > | evaluate (const AnimPose &target, float elapsedSeconds) |
| Evaluate the moving target at an absolute elapsed simulation time since begin. | |
| const AnimPose & | pose () const noexcept |
| Borrow read-only output, valid until destruction; contents change after successful begin/evaluate. Empty before the first successful begin. Copy it to retain a historical sample. | |
详细描述
Finite-duration pose transition relative to a continuously sampled target.
Owns all history and output; retains no skeleton, clip or input pose pointers. Local TRS inputs must share bone order and coordinate space. Unlike ControlPose, this converges exactly at the requested deadline and does not continually lag its target. @thread Owner thread only; no callbacks or reentrancy. Explicit elapsed simulation time makes repeated evaluation deterministic within floating-point tolerance.
在文件 AnimInertializer.h 第 18 行定义.
构造及析构函数说明
◆ AnimInertializer() [1/2]
| eve::animation::AnimInertializer::AnimInertializer | ( | ) |
Construct an empty, independently owned transition.
在文件 AnimInertializer.cpp 第 24 行定义.
◆ ~AnimInertializer()
|
default |
Release owned samples; no external objects are accessed.
◆ AnimInertializer() [2/2]
|
delete |
成员函数说明
◆ begin()
| eve::Result< void > eve::animation::AnimInertializer::begin | ( | const AnimPose & | source, |
| const AnimPose & | previousSource, | ||
| const AnimPose & | target, | ||
| const AnimPose & | previousTarget, | ||
| float | historySeconds, | ||
| float | durationSeconds, | ||
| std::span< const float > | boneTimeFactors = {} |
||
| ) |
Atomically begin or interrupt a transition using actual outgoing pose history.
- 参数
-
source Current outgoing local pose, borrowed only for this call. previousSource Outgoing pose one historySeconds earlier, copied on success. target Incoming pose at transition start, copied on success. previousTarget Incoming pose one historySeconds earlier, copied on success. historySeconds Positive finite history interval, at most one second. durationSeconds Finite nonnegative transition duration, at most ten seconds; zero snaps. boneTimeFactors Empty for uniform duration, otherwise one finite [0,1] factor per bone; copied. Zero snaps that bone immediately, one uses the full duration.
- 返回
- Applied or InvalidArgument leaving prior transition/output unchanged.
在文件 AnimInertializer.cpp 第 27 行定义.
引用了 eve::Applied, count, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, source, eve::Status::success(), eve::Result< T >::success(), target, v , 以及 values.
◆ evaluate()
| eve::Result< void > eve::animation::AnimInertializer::evaluate | ( | const AnimPose & | target, |
| float | elapsedSeconds | ||
| ) |
Evaluate the moving target at an absolute elapsed simulation time since begin.
- 参数
-
target Borrowed local pose at elapsedSeconds; copied, never retained. elapsedSeconds Finite nonnegative time; evaluations may be replayed or partitioned freely.
- 返回
- Applied or InvalidArgument without changing output. Requires a successful begin.
At/after the deadline output equals target. No input pose is modified.
在文件 AnimInertializer.cpp 第 59 行定义.
引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::Status::success(), eve::Result< T >::success() , 以及 target.
◆ operator=()
|
delete |
◆ pose()
|
noexcept |
Borrow read-only output, valid until destruction; contents change after successful begin/evaluate. Empty before the first successful begin. Copy it to retain a historical sample.
在文件 AnimInertializer.cpp 第 70 行定义.
该类的文档由以下文件生成:
- src/modules/animation/AnimInertializer.h
- src/modules/animation/AnimInertializer.cpp