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

Owner-thread authority for bone-bound collider catalogs and continuous sweeps. 更多...

#include <TrajectoryCollision.h>

Public 成员函数

 TrajectoryCollisionRuntime (World3D &world)
 Construct a runtime bound to one borrowed World3D.
 
 ~TrajectoryCollisionRuntime ()
 Releases TrajectoryCollisionRuntime resources.
 
 TrajectoryCollisionRuntime (const TrajectoryCollisionRuntime &)=delete
 
TrajectoryCollisionRuntime & operator= (const TrajectoryCollisionRuntime &)=delete
 
Result< void > registerCollider (BoneColliderDefinition definition)
 Register or replace one collider catalog entry after full validation.
 
Result< void > unregisterCollider (std::string_view colliderId)
 Remove one catalog entry and disarm every matching armed window.
 
Result< void > bindPoseSource (SubjectRef subject, IAttachmentPointSource &source)
 Bind a subject's attachment pose source.
 
Result< void > clearPoseSource (SubjectRef subject)
 Remove one subject's pose source and disarm its armed colliders.
 
Result< void > arm (SubjectRef subject, std::string_view colliderId)
 Arm one collider for continuous sweeps while an attack window is open.
 
Result< void > disarm (SubjectRef subject, std::string_view colliderId)
 Disarm one collider and forget its per-target hit memory.
 
Result< TrajectoryFrame > advance (SimulationTick tick)
 Sample poses for armed colliders, sweep previous→current through World3D, emit unique hits.
 
Result< TrajectorySample > sampleArmed (SubjectRef subject, std::string_view colliderId) const
 Current world-space sample for one armed collider, or NotFound.
 
std::size_t colliderCount () const noexcept
 Number of registered catalog entries.
 
std::size_t armedCount () const noexcept
 Number of armed collider windows.
 
std::size_t poseSourceCount () const noexcept
 Number of subjects with a bound pose source.
 

详细描述

Owner-thread authority for bone-bound collider catalogs and continuous sweeps.

Pose sources are borrowed and must outlive the binding or be cleared first. The World3D is observed through its weak lifetime token, so destroying the world first safely invalidates later advances without retaining body pointers.

@ownership Catalog and armed state are owned by this runtime. World3D owns all solver bodies/shapes. Hits publish process-local handles only. @thread Affine to the physics owner thread; callbacks are never invoked. @reentrancy Methods must not re-enter this runtime or mutate World3D topology from an attachment source during sampling.

在文件 TrajectoryCollision.h 第 87 行定义.

构造及析构函数说明

◆ TrajectoryCollisionRuntime() [1/2]

eve::physics::trajectory::TrajectoryCollisionRuntime::TrajectoryCollisionRuntime ( World3D &  world)
explicit

Construct a runtime bound to one borrowed World3D.

参数
worldWorld observed through its weak lifetime token; it may be destroyed first.

在文件 TrajectoryCollision.cpp 第 49 行定义.

◆ ~TrajectoryCollisionRuntime()

eve::physics::trajectory::TrajectoryCollisionRuntime::~TrajectoryCollisionRuntime ( )
default

Releases TrajectoryCollisionRuntime resources.

◆ TrajectoryCollisionRuntime() [2/2]

eve::physics::trajectory::TrajectoryCollisionRuntime::TrajectoryCollisionRuntime ( const TrajectoryCollisionRuntime &  )
delete

成员函数说明

◆ advance()

Result< TrajectoryFrame > eve::physics::trajectory::TrajectoryCollisionRuntime::advance ( SimulationTick  tick)

Sample poses for armed colliders, sweep previous→current through World3D, emit unique hits.

参数
tickDeterministic simulation tick; must be non-decreasing.

在文件 TrajectoryCollision.cpp 第 277 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::physics::trajectory::TrajectoryFrame::hits, eve::InvalidArgument, key, eve::NotFound, eve::StaleHandle, eve::Result< T >::success(), eve::physics::trajectory::TrajectoryFrame::tick, tick, eve::detail::StrongUint64< Tag >::value() , 以及 world.

◆ arm()

Result< void > eve::physics::trajectory::TrajectoryCollisionRuntime::arm ( SubjectRef  subject,
std::string_view  colliderId 
)

Arm one collider for continuous sweeps while an attack window is open.

备注
Requires a pose source. The first sample becomes both previous and current so the arming frame does not sweep from an uninitialized origin.

在文件 TrajectoryCollision.cpp 第 164 行定义.

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

◆ armedCount()

std::size_t eve::physics::trajectory::TrajectoryCollisionRuntime::armedCount ( ) const
inlinenoexcept

Number of armed collider windows.

在文件 TrajectoryCollision.h 第 136 行定义.

◆ bindPoseSource()

Result< void > eve::physics::trajectory::TrajectoryCollisionRuntime::bindPoseSource ( SubjectRef  subject,
IAttachmentPointSource &  source 
)

Bind a subject's attachment pose source.

参数
subjectNon-nil subject that owns the animated skeleton.
sourceBorrowed pose source; must outlive this binding or be cleared.

在文件 TrajectoryCollision.cpp 第 93 行定义.

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

◆ clearPoseSource()

Result< void > eve::physics::trajectory::TrajectoryCollisionRuntime::clearPoseSource ( SubjectRef  subject)

Remove one subject's pose source and disarm its armed colliders.

在文件 TrajectoryCollision.cpp 第 101 行定义.

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

◆ colliderCount()

std::size_t eve::physics::trajectory::TrajectoryCollisionRuntime::colliderCount ( ) const
inlinenoexcept

Number of registered catalog entries.

在文件 TrajectoryCollision.h 第 134 行定义.

◆ disarm()

Result< void > eve::physics::trajectory::TrajectoryCollisionRuntime::disarm ( SubjectRef  subject,
std::string_view  colliderId 
)

Disarm one collider and forget its per-target hit memory.

在文件 TrajectoryCollision.cpp 第 194 行定义.

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

◆ operator=()

TrajectoryCollisionRuntime & eve::physics::trajectory::TrajectoryCollisionRuntime::operator= ( const TrajectoryCollisionRuntime &  )
delete

◆ poseSourceCount()

std::size_t eve::physics::trajectory::TrajectoryCollisionRuntime::poseSourceCount ( ) const
inlinenoexcept

Number of subjects with a bound pose source.

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

◆ registerCollider()

Result< void > eve::physics::trajectory::TrajectoryCollisionRuntime::registerCollider ( BoneColliderDefinition  definition)

Register or replace one collider catalog entry after full validation.

在文件 TrajectoryCollision.cpp 第 60 行定义.

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

◆ sampleArmed()

Result< TrajectorySample > eve::physics::trajectory::TrajectoryCollisionRuntime::sampleArmed ( SubjectRef  subject,
std::string_view  colliderId 
) const

Current world-space sample for one armed collider, or NotFound.

在文件 TrajectoryCollision.cpp 第 310 行定义.

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

◆ unregisterCollider()

Result< void > eve::physics::trajectory::TrajectoryCollisionRuntime::unregisterCollider ( std::string_view  colliderId)

Remove one catalog entry and disarm every matching armed window.

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

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


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