Pause/single-step/bake controller shared by simulation editor modules. 更多...
#include <EditorSimulationPreview.h>
Public 成员函数 | |
| Result< void > | setFixedDelta (double seconds) |
| Set the fixed preview delta in seconds. | |
| void | setPaused (bool paused) |
| Pause or resume interactive preview stepping. | |
| bool | paused () const |
| Return whether automatic preview advance is paused. | |
| Result< SimulationPreviewFrame > | singleStep (const IEditorSimulationBackend &source) |
| Advance one step even while paused, without mutating the live backend. | |
| Result< SimulationPreviewFrame > | update (const IEditorSimulationBackend &source) |
| Advance only when unpaused. Paused calls return NoOp. | |
| SimulationBakeResult | bake (const IEditorSimulationBackend &source, std::uint64_t sourceRevision, int steps, int maxSteps=10000) const |
| Bake a bounded non-destructive trajectory from a fresh source clone. | |
| void | rewind () |
| Reset preview clock and discard the isolated preview clone. | |
详细描述
Pause/single-step/bake controller shared by simulation editor modules.
在文件 EditorSimulationPreview.h 第 51 行定义.
成员函数说明
◆ bake()
| SimulationBakeResult eve::editor::SimulationPreviewController::bake | ( | const IEditorSimulationBackend & | source, |
| std::uint64_t | sourceRevision, | ||
| int | steps, | ||
| int | maxSteps = 10000 |
||
| ) | const |
Bake a bounded non-destructive trajectory from a fresh source clone.
在文件 EditorSimulationPreview.cpp 第 67 行定义.
引用了 a, b, eve::editor::IEditorSimulationBackend::capture(), eve::editor::IEditorSimulationBackend::cloneForPreview(), eve::editor::SimulationBakeResult::diagnostics, eve::editor::SimulationBakeResult::fixedDelta, eve::editor::SimulationBakeResult::frames, index, eve::InvalidArgument, eve::editing::ruleDiagnostic(), source, eve::editor::SimulationBakeResult::sourceRevision, eve::editor::SimulationBakeResult::status, steps , 以及 eve::Unsupported.
◆ paused()
|
inline |
Return whether automatic preview advance is paused.
在文件 EditorSimulationPreview.h 第 58 行定义.
◆ rewind()
| void eve::editor::SimulationPreviewController::rewind | ( | ) |
Reset preview clock and discard the isolated preview clone.
在文件 EditorSimulationPreview.cpp 第 53 行定义.
◆ setFixedDelta()
| Result< void > eve::editor::SimulationPreviewController::setFixedDelta | ( | double | seconds | ) |
Set the fixed preview delta in seconds.
在文件 EditorSimulationPreview.cpp 第 9 行定义.
◆ setPaused()
|
inline |
Pause or resume interactive preview stepping.
在文件 EditorSimulationPreview.h 第 56 行定义.
◆ singleStep()
| Result< SimulationPreviewFrame > eve::editor::SimulationPreviewController::singleStep | ( | const IEditorSimulationBackend & | source | ) |
Advance one step even while paused, without mutating the live backend.
在文件 EditorSimulationPreview.cpp 第 42 行定义.
引用了 source.
被这些函数引用 update().
◆ update()
| Result< SimulationPreviewFrame > eve::editor::SimulationPreviewController::update | ( | const IEditorSimulationBackend & | source | ) |
Advance only when unpaused. Paused calls return NoOp.
在文件 EditorSimulationPreview.cpp 第 58 行定义.
引用了 singleStep(), source, eve::Status::success() , 以及 eve::Result< T >::success().
该类的文档由以下文件生成:
- src/modules/editor/EditorSimulationPreview.h
- src/modules/editor/EditorSimulationPreview.cpp