Minimal observable contract for physics simulation providers. 更多...
#include <SimulationBackend.h>
Public 成员函数 | |
| virtual | ~ISimulationBackend ()=default |
| Releases the backend; borrowed domain state is not destroyed. | |
| virtual eve::Result< void > | step (const eve::SimulationStep &step, const SimulationSettings &settings)=0 |
| Advances the borrowed solver state by one checked fixed step. | |
| virtual SimulationObservation | observation () const noexcept=0 |
| Returns completed-step observables by value. | |
| virtual SimulationBackendKind | kind () const noexcept=0 |
| Identifies the provider family. | |
| virtual SimulationDeterminism | determinism () const noexcept=0 |
| Returns the provider's replay/determinism guarantee. | |
| virtual eve::Result< void > | restoreObservation (const SimulationObservation &) |
| Restores progress metadata after the owner restores its state. | |
详细描述
Minimal observable contract for physics simulation providers.
The backend borrows domain-owned state and must be destroyed before that state. Implementations own no graphics or presentation resources. Calls are simulation-thread affine and must not run concurrently with another mutation of the same domain state. A failed step leaves observation and domain state unchanged.
在文件 SimulationBackend.h 第 158 行定义.
构造及析构函数说明
◆ ~ISimulationBackend()
|
virtualdefault |
Releases the backend; borrowed domain state is not destroyed.
成员函数说明
◆ determinism()
|
pure virtualnoexcept |
Returns the provider's replay/determinism guarantee.
- 返回
- The declared determinism level.
在 eve::fluids::FluidSimulator, eve::physics::Cloth, eve::physics::Cloth3D, eve::physics::ClothGPU, eve::physics::Rope3D , 以及 eve::physics::SoftBody3D 内被实现.
◆ kind()
|
pure virtualnoexcept |
Identifies the provider family.
- 返回
- CPU, GPU, or a named test accelerator.
在 eve::fluids::FluidSimulator, eve::physics::Cloth, eve::physics::Cloth3D, eve::physics::ClothGPU, eve::physics::Rope3D , 以及 eve::physics::SoftBody3D 内被实现.
◆ observation()
|
pure virtualnoexcept |
Returns completed-step observables by value.
- 返回
- A snapshot that remains valid after the backend changes.
在 eve::fluids::FluidSimulator, eve::physics::Cloth, eve::physics::Cloth3D, eve::physics::ClothGPU, eve::physics::Rope3D , 以及 eve::physics::SoftBody3D 内被实现.
◆ restoreObservation()
|
inlinevirtual |
Restores progress metadata after the owner restores its state.
- 参数
-
observation Completed-step observation to install.
- 返回
- Applied when supported, or Unsupported when the backend cannot restore metadata without rebuilding its state.
- 备注
- This operation changes only backend-owned progress metadata; callers must restore the domain state atomically as one unit.
Failure.
被 eve::fluids::FluidSimulator, eve::physics::Cloth, eve::physics::Cloth3D, eve::physics::ClothGPU, eve::physics::Rope3D , 以及 eve::physics::SoftBody3D 重载.
在文件 SimulationBackend.h 第 200 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure() , 以及 eve::Unsupported.
◆ step()
|
pure virtual |
Advances the borrowed solver state by one checked fixed step.
- 参数
-
step Injected tick and duration; tick must increase strictly. settings Solver policy for this step.
- 返回
- Applied with updated state, or a structured rejection/failure.
在 eve::fluids::FluidSimulator, eve::physics::Cloth, eve::physics::Cloth3D, eve::physics::ClothGPU, eve::physics::Rope3D , 以及 eve::physics::SoftBody3D 内被实现.
该类的文档由以下文件生成:
- src/modules/physics/backend/SimulationBackend.h