Independent clock over a frozen, shared collapse animation. @ownership Owns a shared immutable snapshot. Copies share samples but copy clock state. @lifetime No world, renderer or caller-owned pointers are retained. @thread Each instance requires exclusive access during mutation; separate copies may run concurrently. No callbacks, IO, wall clock or physical simulation occur during playback. 更多...
#include <CollapsePlayback.h>
Public 成员函数 | |
| Result< void > | advance (double elapsedSeconds) |
| Advance by injected nonnegative elapsed seconds. Failures preserve time. | |
| Result< void > | seek (double seconds) |
| Seek to finite seconds, clamped to both inclusive endpoints; ignores pause and rate. | |
| Result< void > | setRate (double rate) |
| Set finite signed speed; zero freezes, negative reverses. Failure preserves rate. | |
| void | setPaused (bool paused) noexcept |
| Pause or resume without modifying time. | |
| Result< void > | setWrap (CollapsePlaybackWrap wrap) |
| Set endpoint behavior, rejecting invalid enum values without mutation. | |
| Result< void > | setPlacement (CollapsePlacement placement) |
| Set finite rigid placement with a nonzero quaternion. Invalid input preserves placement. | |
| CollapsePlacement | placement () const noexcept |
| Current normalized rigid placement, returned by value. | |
| double | time () const noexcept |
| Current time in seconds. | |
| double | rate () const noexcept |
| Signed playback speed. | |
| bool | paused () const noexcept |
| Whether the clock is paused. | |
| Result< BonePresentation > | sample (int bone) const |
| Sample at current time using the clip's interpolation and discrete-state contract. | |
| std::shared_ptr< const CollapseAnimation > | animation () const noexcept |
| Shared immutable clip; returned ownership survives this player's destruction. | |
静态 Public 成员函数 | |
| static Result< CollapsePlayback > | prepare (CollapseAnimation animation) |
| Freeze an owning clip, rejecting empty recordings. | |
详细描述
Independent clock over a frozen, shared collapse animation. @ownership Owns a shared immutable snapshot. Copies share samples but copy clock state. @lifetime No world, renderer or caller-owned pointers are retained. @thread Each instance requires exclusive access during mutation; separate copies may run concurrently. No callbacks, IO, wall clock or physical simulation occur during playback.
在文件 CollapsePlayback.h 第 20 行定义.
成员函数说明
◆ advance()
| Result< void > eve::physics::CollapsePlayback::advance | ( | double | elapsedSeconds | ) |
Advance by injected nonnegative elapsed seconds. Failures preserve time.
- 返回
- Failure for nonfinite/negative elapsed time or arithmetic overflow, even while paused. Loop advancement uses [0,duration); zero-duration clips remain at zero.
在文件 CollapsePlayback.cpp 第 19 行定义.
◆ animation()
|
noexcept |
Shared immutable clip; returned ownership survives this player's destruction.
在文件 CollapsePlayback.cpp 第 47 行定义.
被这些函数引用 eve::physics::GeometryCollectionRenderer::preparePlayback() , 以及 eve::physics::GeometryCollectionRenderer::submitPlayback().
◆ paused()
|
noexcept |
Whether the clock is paused.
在文件 CollapsePlayback.cpp 第 28 行定义.
◆ placement()
|
noexcept |
Current normalized rigid placement, returned by value.
在文件 CollapsePlayback.cpp 第 25 行定义.
◆ prepare()
|
static |
Freeze an owning clip, rejecting empty recordings.
- 参数
-
animation Value snapshot; move an existing clip to avoid copying its samples. @cost Copying an lvalue is linear in recorded samples; prepare once and copy players cheaply.
- 返回
- Player at zero seconds, running at rate one, with clamped endpoints, or an internal allocation failure diagnostic. Existing players are unchanged; a moved input is consumed even on failure.
- 异常
-
std::bad_alloc If copying the by-value argument or allocating the failure diagnostic fails.
在文件 CollapsePlayback.cpp 第 10 行定义.
◆ rate()
|
noexcept |
Signed playback speed.
在文件 CollapsePlayback.cpp 第 27 行定义.
◆ sample()
| Result< BonePresentation > eve::physics::CollapsePlayback::sample | ( | int | bone | ) | const |
Sample at current time using the clip's interpolation and discrete-state contract.
在文件 CollapsePlayback.cpp 第 29 行定义.
被这些函数引用 eve::physics::GeometryCollectionRenderer::submitPlayback().
◆ seek()
| Result< void > eve::physics::CollapsePlayback::seek | ( | double | seconds | ) |
Seek to finite seconds, clamped to both inclusive endpoints; ignores pause and rate.
在文件 CollapsePlayback.cpp 第 20 行定义.
◆ setPaused()
|
noexcept |
Pause or resume without modifying time.
在文件 CollapsePlayback.cpp 第 22 行定义.
◆ setPlacement()
| Result< void > eve::physics::CollapsePlayback::setPlacement | ( | CollapsePlacement | placement | ) |
Set finite rigid placement with a nonzero quaternion. Invalid input preserves placement.
- 返回
- Checked admission status; coordinates that overflow after placement fail during sampling.
在文件 CollapsePlayback.cpp 第 24 行定义.
引用了 placement.
◆ setRate()
| Result< void > eve::physics::CollapsePlayback::setRate | ( | double | rate | ) |
Set finite signed speed; zero freezes, negative reverses. Failure preserves rate.
在文件 CollapsePlayback.cpp 第 21 行定义.
引用了 rate.
◆ setWrap()
| Result< void > eve::physics::CollapsePlayback::setWrap | ( | CollapsePlaybackWrap | wrap | ) |
Set endpoint behavior, rejecting invalid enum values without mutation.
在文件 CollapsePlayback.cpp 第 23 行定义.
◆ time()
|
noexcept |
Current time in seconds.
在文件 CollapsePlayback.cpp 第 26 行定义.
该类的文档由以下文件生成:
- src/modules/physics/backend/bake/collapse/CollapsePlayback.h
- src/modules/physics/backend/bake/collapse/CollapsePlayback.cpp