Immutable field collection preparing one force batch for a set of dynamic recipients. @ownership Owns copied model values only; requests and worlds are borrowed for the call, never retained. @thread Build on any thread with immutable inputs; prepare on the simulation owner, outside callbacks. @reentrancy No callbacks or locks. Failures never mutate worlds; prepare does not wake bodies. 更多...
#include <FieldSet.h>
Public 成员函数 | |
| Result< ForceBatch > | prepare (World &world, std::span< const FieldTarget > targets) const |
| Sample all matching fields at each planar body center, then prepare a single atomic batch. | |
| Result< ForceBatch > | prepare (World3D &world, std::span< const FieldTarget > targets) const |
| Sample all matching fields at each spatial body center, then prepare a single atomic batch. | |
静态 Public 成员函数 | |
| static Result< FieldSet > | build (std::span< const FieldDefinition > fields) |
| Validate and copy definitions; invalid models reject the entire set, even when filtered out. | |
详细描述
Immutable field collection preparing one force batch for a set of dynamic recipients. @ownership Owns copied model values only; requests and worlds are borrowed for the call, never retained. @thread Build on any thread with immutable inputs; prepare on the simulation owner, outside callbacks. @reentrancy No callbacks or locks. Failures never mutate worlds; prepare does not wake bodies.
Categories are explicit caller data, not a second copy of backend collision masks. Fields evaluate in definition order; duplicate recipient handles reject rather than double-apply. Prepared forces capture current body mass/position; commit promptly before stepping or changing body state.
在文件 FieldSet.h 第 31 行定义.
成员函数说明
◆ build()
|
static |
Validate and copy definitions; invalid models reject the entire set, even when filtered out.
- 返回
- Owned immutable collection or InvalidArgument. @cost Linear validation and storage in number of definitions; build once and reuse across steps.
在文件 FieldSet.cpp 第 65 行定义.
引用了 eve::Result< T >::failure(), eve::physics::snapshot_detail::field(), fields, model, origin , 以及 eve::Result< T >::success().
◆ prepare() [1/2]
| Result< ForceBatch > eve::physics::FieldSet::prepare | ( | World & | world, |
| std::span< const FieldTarget > | targets | ||
| ) | const |
Sample all matching fields at each planar body center, then prepare a single atomic batch.
- 返回
- Move-only batch or invalid/stale/duplicate recipient or overflowing force failure. @cost O(fields * targets + targets log targets) evaluation and linear temporary storage per step.
在文件 FieldSet.cpp 第 73 行定义.
引用了 targets.
◆ prepare() [2/2]
| Result< ForceBatch > eve::physics::FieldSet::prepare | ( | World3D & | world, |
| std::span< const FieldTarget > | targets | ||
| ) | const |
Sample all matching fields at each spatial body center, then prepare a single atomic batch.
- 返回
- Move-only batch or invalid/stale/duplicate recipient or overflowing force failure. @cost O(fields * targets + targets log targets) evaluation and linear temporary storage per step.
在文件 FieldSet.cpp 第 76 行定义.
引用了 targets.
该类的文档由以下文件生成:
- src/modules/physics/forces/FieldSet.h
- src/modules/physics/forces/FieldSet.cpp