载入中...
搜索中...
未找到
eve::physics::ForceBatch类 参考

Move-only, single-use collection of validated force requests. @ownership Owns values and handles only, never world/body pointers. Safe to discard. @thread Prepare/commit on the world's simulation owner, outside solver callbacks. @reentrancy No callbacks. A successful commit consumes the batch; failure changes no bodies. 更多...

#include <ForceBatch.h>

Public 成员函数

 ForceBatch (const ForceBatch &)=delete
 
ForceBatch & operator= (const ForceBatch &)=delete
 
 ForceBatch (ForceBatch &&other) noexcept
 Transfers the single-use submission right; the source becomes consumed.
 
ForceBatch & operator= (ForceBatch &&other) noexcept
 Replaces unsubmitted requests, consuming the source.
 
Result< ForceReceipt > commit (World &world, const SimulationStep &step)
 Revalidate all planar requests and submit once; rejects consumed or foreign batches.
 
Result< ForceReceipt > commit (World3D &world, const SimulationStep &step)
 Revalidate all spatial requests and submit once; rejects consumed or foreign batches.
 

静态 Public 成员函数

static Result< ForceBatch > prepare (World &world, std::span< const ForceLoad > loads)
 Validate and copy planar requests without waking or applying forces.
 
static Result< ForceBatch > prepare (World3D &world, std::span< const ForceLoad > loads)
 Validate and copy spatial requests without waking or applying forces.
 

详细描述

Move-only, single-use collection of validated force requests. @ownership Owns values and handles only, never world/body pointers. Safe to discard. @thread Prepare/commit on the world's simulation owner, outside solver callbacks. @reentrancy No callbacks. A successful commit consumes the batch; failure changes no bodies.

Commit revalidates all targets and recomputes moment arms at current centers of mass. Binds forces to an exact tick/duration. A failed step preserves pending forces for retry without resubmission. All batches pending in a world must name the same step. Direct raw stepping/force clearing is forbidden. Do not mix unbounded raw-backend force accumulation with this API.

在文件 ForceBatch.h 第 26 行定义.

构造及析构函数说明

◆ ForceBatch() [1/2]

eve::physics::ForceBatch::ForceBatch ( const ForceBatch &  )
delete

◆ ForceBatch() [2/2]

eve::physics::ForceBatch::ForceBatch ( ForceBatch &&  other)
noexcept

Transfers the single-use submission right; the source becomes consumed.

在文件 ForceBatch.cpp 第 62 行定义.

成员函数说明

◆ commit() [1/2]

Result< ForceReceipt > eve::physics::ForceBatch::commit ( World &  world,
const SimulationStep &  step 
)

Revalidate all planar requests and submit once; rejects consumed or foreign batches.

返回
Read-only step receipt or structured failure, with no partial application on failure. @cost O(n log n) validation/aggregation per batch, then one force/torque pair per target.

在文件 ForceBatch.cpp 第 89 行定义.

引用了 body, handle, state, status, step , 以及 valid.

◆ commit() [2/2]

Result< ForceReceipt > eve::physics::ForceBatch::commit ( World3D &  world,
const SimulationStep &  step 
)

Revalidate all spatial requests and submit once; rejects consumed or foreign batches.

返回
Read-only step receipt or structured failure, with no partial application on failure. @cost O(n log n) validation/aggregation per batch, then one force/torque pair per target.

在文件 ForceBatch.cpp 第 114 行定义.

引用了 body, handle, state, status, step , 以及 valid.

◆ operator=() [1/2]

ForceBatch & eve::physics::ForceBatch::operator= ( const ForceBatch &  )
delete

◆ operator=() [2/2]

ForceBatch & eve::physics::ForceBatch::operator= ( ForceBatch &&  other)
noexcept

Replaces unsubmitted requests, consuming the source.

在文件 ForceBatch.cpp 第 67 行定义.

◆ prepare() [1/2]

Result< ForceBatch > eve::physics::ForceBatch::prepare ( World &  world,
std::span< const ForceLoad >  loads 
)
static

Validate and copy planar requests without waking or applying forces.

返回
Owning batch or invalid/stale/stepping-world failure. @cost Linear storage and O(n log n) aggregation in request count; prepare once per fixed step.

在文件 ForceBatch.cpp 第 76 行定义.

引用了 status.

◆ prepare() [2/2]

Result< ForceBatch > eve::physics::ForceBatch::prepare ( World3D &  world,
std::span< const ForceLoad >  loads 
)
static

Validate and copy spatial requests without waking or applying forces.

返回
Owning batch or invalid/stale/stepping-world failure. @cost Linear storage and O(n log n) aggregation in request count; prepare once per fixed step.

在文件 ForceBatch.cpp 第 83 行定义.

引用了 status.


该类的文档由以下文件生成: