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

Runtime owner of bone state, connection strain, and PhysicsLink bindings. 更多...

#include <GeometryCollectionInstance.h>

Public 成员函数

 GeometryCollectionInstance (const GeometryCollectionInstance &)=delete
 
GeometryCollectionInstance & operator= (const GeometryCollectionInstance &)=delete
 
 ~GeometryCollectionInstance ()
 Geometry collection instance.
 
bool hasLiveWorld () const noexcept
 Whether the owning world handle still resolves.
 
void setStepBudget (DestructionStepBudget budget) noexcept
 Replace the per-step break/sleep budgets (0 = unlimited).
 
DestructionStepBudget stepBudget () const noexcept
 Return the active per-step budgets.
 
eve::Result< FieldApplicationReceipt > applyField (const DestructionField &field)
 Apply one destruction field; failure leaves instance unchanged.
 
eve::Result< DestructionStepReceipt > step (SimulationStep step)
 Advance connection-graph breaks under the configured budget.
 
int boneCount () const noexcept
 
int edgeCount () const noexcept
 
BoneRuntimeState boneState (int boneIndex) const
 
int boneClusterId (int boneIndex) const
 
float edgeStrain (int edgeIndex) const
 
bool isEdgeBroken (int edgeIndex) const
 Whether the edge at index has already broken.
 
int detachEventCount () const noexcept
 
BoneDetachEvent detachEventAt (int index) const
 
int clusterBreakEventCount () const noexcept
 
ClusterBreakEvent clusterBreakEventAt (int index) const
 Cluster break event at.
 
int pendingEdgeBreakCount () const noexcept
 Edges still waiting because of the break budget.
 
eve::Result< PhysicsLink > boneLink (int boneIndex) const
 Resolve the PhysicsLink for one bone against the live world.
 
eve::Result< BonePresentation > bonePresentation (int boneIndex) const
 Sample one bone's world pose and proxy extents for presentation.
 
std::uint64_t sleepBatchRevision () const noexcept
 Monotonic revision bumped when any bone enters Sleeping (for batch rebuild).
 
eve::Result< GeometryCollectionInstanceSnapshot > captureSnapshot () const
 Capture a process-portable runtime snapshot (no PhysicsLink handles). @ownership Caller owns the returned snapshot value.
 
eve::Result< void > restoreSnapshot (const GeometryCollectionInstanceSnapshot &snapshot)
 Restore bone/edge state from a snapshot against the live world.
 
void releaseBodies ()
 Destroy owned bodies if the world is still live; always clears links.
 

静态 Public 成员函数

static eve::Result< std::unique_ptr< GeometryCollectionInstance > > create (World3D &world, const GeometryCollectionAsset &asset, float originX, float originY, float originZ)
 Create bodies for every bone and bind PhysicsLinks.
 

详细描述

Runtime owner of bone state, connection strain, and PhysicsLink bindings.

@ownership Owns Body3D objects it creates; never retains raw World3D or Body3D pointers across calls. Borrows World3D only through a process-local handle. @lifetime Instance-first teardown destroys owned bodies then clears links; world-first teardown makes later resolve/step/applyField return StaleHandle. Either order leaves PhysicsLinks resolvable without use-after-free.

在文件 GeometryCollectionInstance.h 第 96 行定义.

构造及析构函数说明

◆ GeometryCollectionInstance()

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

◆ ~GeometryCollectionInstance()

eve::physics::GeometryCollectionInstance::~GeometryCollectionInstance ( )

Geometry collection instance.

在文件 GeometryCollectionInstance.cpp 第 36 行定义.

成员函数说明

◆ applyField()

◆ boneClusterId()

int eve::physics::GeometryCollectionInstance::boneClusterId ( int  boneIndex) const

在文件 GeometryCollectionInstance.cpp 第 386 行定义.

引用了 clusterId.

◆ boneCount()

int eve::physics::GeometryCollectionInstance::boneCount ( ) const
inlinenoexcept

◆ boneLink()

eve::Result< PhysicsLink > eve::physics::GeometryCollectionInstance::boneLink ( int  boneIndex) const

◆ bonePresentation()

◆ boneState()

BoneRuntimeState eve::physics::GeometryCollectionInstance::boneState ( int  boneIndex) const

在文件 GeometryCollectionInstance.cpp 第 381 行定义.

引用了 state.

◆ captureSnapshot()

eve::Result< GeometryCollectionInstanceSnapshot > eve::physics::GeometryCollectionInstance::captureSnapshot ( ) const

Capture a process-portable runtime snapshot (no PhysicsLink handles). @ownership Caller owns the returned snapshot value.

在文件 GeometryCollectionInstance.cpp 第 452 行定义.

引用了 eve::physics::GeometryCollectionInstanceSnapshot::EdgeSnapshot::accumulatedStrain, eve::physics::GeometryCollectionInstanceSnapshot::BoneSnapshot::anchored, bone, eve::physics::GeometryCollectionInstanceSnapshot::EdgeSnapshot::boneA, eve::physics::GeometryCollectionInstanceSnapshot::EdgeSnapshot::boneB, eve::physics::GeometryCollectionInstanceSnapshot::bones, eve::physics::GeometryCollectionInstanceSnapshot::EdgeSnapshot::broken, eve::physics::GeometryCollectionInstanceSnapshot::BoneSnapshot::clusterId, edge, eve::physics::GeometryCollectionInstanceSnapshot::edges, eve::Result< T >::failure(), eve::physics::GeometryCollectionInstanceSnapshot::BoneSnapshot::fractureLevel, eve::physics::GeometryCollectionInstanceSnapshot::BoneSnapshot::halfExtentX, eve::physics::GeometryCollectionInstanceSnapshot::BoneSnapshot::halfExtentY, eve::physics::GeometryCollectionInstanceSnapshot::BoneSnapshot::halfExtentZ, eve::physics::GeometryCollectionInstanceSnapshot::lastTick, eve::physics::GeometryCollectionInstanceSnapshot::originX, eve::physics::GeometryCollectionInstanceSnapshot::originY, eve::physics::GeometryCollectionInstanceSnapshot::originZ, eve::physics::GeometryCollectionInstanceSnapshot::sleepBatchRevision, eve::physics::GeometryCollectionInstanceSnapshot::BoneSnapshot::state, eve::physics::GeometryCollectionInstanceSnapshot::EdgeSnapshot::strainThreshold, eve::Result< T >::success(), valid , 以及 eve::physics::GeometryCollectionInstanceSnapshot::validate().

◆ clusterBreakEventAt()

ClusterBreakEvent eve::physics::GeometryCollectionInstance::clusterBreakEventAt ( int  index) const

Cluster break event at.

在文件 GeometryCollectionInstance.cpp 第 406 行定义.

引用了 index.

◆ clusterBreakEventCount()

int eve::physics::GeometryCollectionInstance::clusterBreakEventCount ( ) const
inlinenoexcept

在文件 GeometryCollectionInstance.h 第 150 行定义.

◆ create()

eve::Result< std::unique_ptr< GeometryCollectionInstance > > eve::physics::GeometryCollectionInstance::create ( World3D &  world,
const GeometryCollectionAsset &  asset,
float  originX,
float  originY,
float  originZ 
)
static

Create bodies for every bone and bind PhysicsLinks.

参数
worldBorrowed World3D that must outlive successful physics writes.
assetImmutable bone/edge definition (copied).
originXOrigin of the collection in world metres.
originYOrigin of the collection in world metres.
originZOrigin of the collection in world metres.
返回
Owning instance, or a structured failure without partial bodies. @ownership Caller owns the returned unique_ptr; Instance owns created bodies. @lifetime World must remain live for physics writes until releaseBodies or Instance destruction; world destruction first yields StaleHandle.

在文件 GeometryCollectionInstance.cpp 第 38 行定义.

引用了 body, bone, eve::physics::GeometryCollectionAsset::bones, edge, eve::physics::GeometryCollectionAsset::edges, eve::Diagnostic::error(), eve::Failed, eve::StaleHandle, valid, eve::physics::GeometryCollectionAsset::validate(), world, x, y , 以及 z.

被这些函数引用 eve::physics::Destruction::createInstance().

◆ detachEventAt()

BoneDetachEvent eve::physics::GeometryCollectionInstance::detachEventAt ( int  index) const

在文件 GeometryCollectionInstance.cpp 第 401 行定义.

引用了 index.

◆ detachEventCount()

int eve::physics::GeometryCollectionInstance::detachEventCount ( ) const
inlinenoexcept

在文件 GeometryCollectionInstance.h 第 148 行定义.

◆ edgeCount()

int eve::physics::GeometryCollectionInstance::edgeCount ( ) const
inlinenoexcept

在文件 GeometryCollectionInstance.h 第 142 行定义.

◆ edgeStrain()

float eve::physics::GeometryCollectionInstance::edgeStrain ( int  edgeIndex) const

在文件 GeometryCollectionInstance.cpp 第 391 行定义.

◆ hasLiveWorld()

bool eve::physics::GeometryCollectionInstance::hasLiveWorld ( ) const
noexcept

Whether the owning world handle still resolves.

在文件 GeometryCollectionInstance.cpp 第 106 行定义.

被这些函数引用 eve::physics::GeometryCollectionRenderer::draw().

◆ isEdgeBroken()

bool eve::physics::GeometryCollectionInstance::isEdgeBroken ( int  edgeIndex) const

Whether the edge at index has already broken.

在文件 GeometryCollectionInstance.cpp 第 396 行定义.

◆ operator=()

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

◆ pendingEdgeBreakCount()

int eve::physics::GeometryCollectionInstance::pendingEdgeBreakCount ( ) const
inlinenoexcept

Edges still waiting because of the break budget.

在文件 GeometryCollectionInstance.h 第 156 行定义.

◆ releaseBodies()

void eve::physics::GeometryCollectionInstance::releaseBodies ( )

Destroy owned bodies if the world is still live; always clears links.

在文件 GeometryCollectionInstance.cpp 第 566 行定义.

引用了 bone , 以及 world.

◆ restoreSnapshot()

◆ setStepBudget()

void eve::physics::GeometryCollectionInstance::setStepBudget ( DestructionStepBudget  budget)
inlinenoexcept

Replace the per-step break/sleep budgets (0 = unlimited).

在文件 GeometryCollectionInstance.h 第 125 行定义.

◆ sleepBatchRevision()

std::uint64_t eve::physics::GeometryCollectionInstance::sleepBatchRevision ( ) const
inlinenoexcept

Monotonic revision bumped when any bone enters Sleeping (for batch rebuild).

在文件 GeometryCollectionInstance.h 第 169 行定义.

被这些函数引用 eve::physics::GeometryCollectionRenderer::draw().

◆ step()

eve::Result< DestructionStepReceipt > eve::physics::GeometryCollectionInstance::step ( SimulationStep  step)

Advance connection-graph breaks under the configured budget.

参数
stepInjected simulation tick/delta; wall clock is never read.
返回
Receipt with broken/deferred edge counts, or a structured failure that leaves topology unchanged.

在文件 GeometryCollectionInstance.cpp 第 333 行定义.

引用了 edge, eve::physics::DestructionStepReceipt::edgesBroken, eve::physics::DestructionStepReceipt::edgesDeferred, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::StaleHandle, step, eve::Result< T >::success(), tick , 以及 world.

◆ stepBudget()

DestructionStepBudget eve::physics::GeometryCollectionInstance::stepBudget ( ) const
inlinenoexcept

Return the active per-step budgets.

在文件 GeometryCollectionInstance.h 第 127 行定义.


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