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

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

#include <GeometryCollectionInstance.h>

类 eve::physics::GeometryCollectionInstance 继承关系图:
eve::physics::CollapseCaptureSource

Public 成员函数

 GeometryCollectionInstance (const GeometryCollectionInstance &)=delete
 
GeometryCollectionInstance & operator= (const GeometryCollectionInstance &)=delete
 
 ~GeometryCollectionInstance () override
 Geometry collection instance.
 
std::shared_ptr< const FractureGeometry > fragmentGeometry () const noexcept override
 Shared immutable geometry; empty for legacy box collections. @ownership Returned shared value keeps geometry alive independently of this instance. @thread Owner thread for acquisition; read-only sharing is safe after publication.
 
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 override
 Stable positive fragment count for this sample.
 
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 override
 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 成员函数 继承自 eve::physics::CollapseCaptureSource
virtual ~CollapseCaptureSource ()
 Release the protocol object; does not transfer ownership to a recorder.
 

静态 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.
 
static eve::Result< std::unique_ptr< GeometryCollectionInstance > > createFractured (World3D &world, const GeometryCollectionAsset &asset, const FractureGeometry &geometry, float originX, float originY, float originZ)
 Instantiate exact convex fragments from a cooked mesh/graph pair.
 

详细描述

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 第 70 行定义.

构造及析构函数说明

◆ GeometryCollectionInstance()

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

◆ ~GeometryCollectionInstance()

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

Geometry collection instance.

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

成员函数说明

◆ applyField()

◆ boneClusterId()

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

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

引用了 clusterId.

◆ boneCount()

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

Stable positive fragment count for this sample.

实现了 eve::physics::CollapseCaptureSource.

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

被这些函数引用 eve::physics::GeometryCollectionRenderer::draw() , 以及 eve::physics::GeometryCollectionRenderer::prepareInstance().

◆ boneLink()

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

◆ bonePresentation()

eve::Result< BonePresentation > eve::physics::GeometryCollectionInstance::bonePresentation ( int  boneIndex) const
overridevirtual

Sample one bone's world pose and proxy extents for presentation.

返回
Owning snapshot, or StaleHandle/InvalidArgument without mutating state.

实现了 eve::physics::CollapseCaptureSource.

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

引用了 body, bone, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, presentation, eve::StaleHandle, eve::physics::BonePresentation::state , 以及 eve::Result< T >::success().

被这些函数引用 eve::physics::GeometryCollectionRenderer::draw() , 以及 eve::physics::GeometryCollectionRenderer::prepareInstance().

◆ boneState()

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

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

引用了 state.

◆ captureSnapshot()

◆ clusterBreakEventAt()

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

Cluster break event at.

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

引用了 index.

◆ clusterBreakEventCount()

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

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

◆ 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 第 40 行定义.

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

◆ createFractured()

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

Instantiate exact convex fragments from a cooked mesh/graph pair.

参数
geometryOwning immutable copy is retained, shared with captured clips.
返回
Complete owning instance or failure after rolling back all created bodies. @cost Linear hull creation; instantiate once, then reuse for offline baking. @thread Owning physics thread; no callbacks. World is borrowed only during calls. @lifetime Uses the same generation-qualified world and destruction contract as create().

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

引用了 b, eve::physics::GeometryCollectionAsset::bones, eve::Diagnostic::error(), f, geometry, eve::InvalidArgument, v, valid, x, y , 以及 z.

◆ detachEventAt()

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

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

引用了 index.

◆ detachEventCount()

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

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

◆ edgeCount()

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

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

◆ edgeStrain()

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

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

◆ fragmentGeometry()

std::shared_ptr< const FractureGeometry > eve::physics::GeometryCollectionInstance::fragmentGeometry ( ) const
overridevirtualnoexcept

Shared immutable geometry; empty for legacy box collections. @ownership Returned shared value keeps geometry alive independently of this instance. @thread Owner thread for acquisition; read-only sharing is safe after publication.

实现了 eve::physics::CollapseCaptureSource.

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

被这些函数引用 eve::physics::GeometryCollectionRenderer::draw() , 以及 eve::physics::GeometryCollectionRenderer::prepareInstance().

◆ hasLiveWorld()

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

Whether the owning world handle still resolves.

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

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

◆ isEdgeBroken()

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

Whether the edge at index has already broken.

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

◆ 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 第 146 行定义.

◆ releaseBodies()

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

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

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

引用了 bone.

◆ restoreSnapshot()

eve::Result< void > eve::physics::GeometryCollectionInstance::restoreSnapshot ( const GeometryCollectionInstanceSnapshot &  snapshot)

Restore bone/edge state from a snapshot against the live world.

返回
Success, or InvalidArgument/StaleHandle without partial mutation.

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

引用了 body, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::physics::Body3D::setType(), snapshot, eve::StaleHandle, state, eve::Result< T >::success() , 以及 valid.

◆ setStepBudget()

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

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

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

◆ sleepBatchRevision()

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

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

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

被这些函数引用 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 第 393 行定义.

引用了 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.

◆ stepBudget()

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

Return the active per-step budgets.

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


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