载入中...
搜索中...
未找到
eve::fluids::VolumeFluidCoupling类 参考final

Process-local generation-checked bridge between fluid samples and rigid bodies. @ownership Owns local collider descriptions and typed physics links, never world/body/solver pointers. @thread Simulation-thread affine; no callbacks, concurrent mutation or reentrancy. 更多...

#include <VolumeFluidCoupling.h>

类

struct  Impl
 

Public 成员函数

 VolumeFluidCoupling ()
 Volume fluid coupling.
 
 ~VolumeFluidCoupling ()
 Volume fluid coupling.
 
 VolumeFluidCoupling (const VolumeFluidCoupling &)=delete
 
VolumeFluidCoupling & operator= (const VolumeFluidCoupling &)=delete
 
Result< void > attach (physics::Body3D &body, const VolumeFluidCollider &localShape)
 Registers a live body and local-space shape; labels must be unique, maximum 1024.
 
void detach (unsigned label)
 Removes a label; absent labels are a successful no-op.
 
Result< void > setImpulseLimits (float maximumLinearDelta, float maximumAngularDelta)
 Sets per-step rigid velocity-change limits used after impulse aggregation.
 
unsigned lastClampedBodyCount () const
 Returns how many linked bodies had a linear or angular impulse scaled in the last successful step.
 
Result< unsigned > step (physics::World3D &world, VolumeFluid &fluid, float dt, unsigned substeps=4, std::span< const VolumeFluidThermalRule > rules={})
 Resolves all links, samples poses, advances fluid and applies opposite impulses once.
 

详细描述

Process-local generation-checked bridge between fluid samples and rigid bodies. @ownership Owns local collider descriptions and typed physics links, never world/body/solver pointers. @thread Simulation-thread affine; no callbacks, concurrent mutation or reentrancy.

Step exclusively supplies the solver's collider set. Destroying this bridge leaves both worlds alive; destroying a body/world makes the stored link stale. After restore/hot reload, reconstruct links from application persistent identity. This bridge has no serialized runtime handles and invokes no world.step callbacks.

在文件 VolumeFluidCoupling.h 第 25 行定义.

构造及析构函数说明

◆ VolumeFluidCoupling() [1/2]

eve::fluids::VolumeFluidCoupling::VolumeFluidCoupling ( )

Volume fluid coupling.

在文件 VolumeFluidCoupling.cpp 第 24 行定义.

◆ ~VolumeFluidCoupling()

eve::fluids::VolumeFluidCoupling::~VolumeFluidCoupling ( )
default

Volume fluid coupling.

◆ VolumeFluidCoupling() [2/2]

eve::fluids::VolumeFluidCoupling::VolumeFluidCoupling ( const VolumeFluidCoupling &  )
delete

成员函数说明

◆ attach()

Result< void > eve::fluids::VolumeFluidCoupling::attach ( physics::Body3D &  body,
const VolumeFluidCollider &  localShape 
)

◆ detach()

void eve::fluids::VolumeFluidCoupling::detach ( unsigned  label)

Removes a label; absent labels are a successful no-op.

在文件 VolumeFluidCoupling.cpp 第 41 行定义.

引用了 b , 以及 label.

◆ lastClampedBodyCount()

unsigned eve::fluids::VolumeFluidCoupling::lastClampedBodyCount ( ) const

Returns how many linked bodies had a linear or angular impulse scaled in the last successful step.

在文件 VolumeFluidCoupling.cpp 第 53 行定义.

被这些函数引用 eve::fluids::exposeVolumeFluidType().

◆ operator=()

VolumeFluidCoupling & eve::fluids::VolumeFluidCoupling::operator= ( const VolumeFluidCoupling &  )
delete

◆ setImpulseLimits()

Result< void > eve::fluids::VolumeFluidCoupling::setImpulseLimits ( float  maximumLinearDelta,
float  maximumAngularDelta 
)

Sets per-step rigid velocity-change limits used after impulse aggregation.

参数
maximumLinearDeltaMaximum center-of-mass speed change in [0.01,1000] m/s.
maximumAngularDeltaMaximum angular-speed change in [0.01,10000] rad/s.

Simulation-thread only. Defaults are 20 m/s and 100 rad/s. The complete fluid step remains authoritative; only the outgoing partitioned rigid impulse is scaled. No callback or external object is retained.

在文件 VolumeFluidCoupling.cpp 第 44 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument , 以及 eve::Result< T >::success().

◆ step()

Result< unsigned > eve::fluids::VolumeFluidCoupling::step ( physics::World3D &  world,
VolumeFluid &  fluid,
float  dt,
unsigned  substeps = 4,
std::span< const VolumeFluidThermalRule >  rules = {} 
)

Resolves all links, samples poses, advances fluid and applies opposite impulses once.

返回
Number of contact and attachment-reaction contributions applied. Stale links fail before either domain mutates.

All linked bodies must belong to the supplied world. Forces are aggregated about each body's center of mass, preserving the contact torque. Prescribed attached solids return their linear inertia and gravity load; this includes ellipsoid angular inertia and is separate from collider-contact impulses; each contribution is applied once. Rigid integration is caller-owned: call world.step after this operation. This is partitioned coupling, not a shared iterative rigid/fluid solve. Optional thermal rules use sampled collider labels in the same fluid step. Rules are borrowed only for this call; invalid rules leave both domains unchanged. Aggregated impulses are bounded by setImpulseLimits to prevent a light rigid body from destabilizing the next partitioned fluid sample.

在文件 VolumeFluidCoupling.cpp 第 54 行定义.

引用了 at, eve::fluids::VolumeFluid::attachmentReactions(), binding, body, center, eve::fluids::VolumeFluid::contacts(), eve::Diagnostic::error(), eve::Result< T >::failure(), q, reactions, rotation, eve::StaleHandle, eve::fluids::VolumeFluid::stepWithColliders(), eve::Result< T >::success(), world, x, y , 以及 z.


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