载入中...
搜索中...
未找到
eve::animation::MontagePlayer类 参考

Presentation-only montage player over an ActionTimeline. 更多...

#include <MontagePlayer.h>

Public 成员函数

 MontagePlayer (AnimSkeleton &skeleton)
 Borrow a skeleton that must outlive this player.
 
 ~MontagePlayer ()
 Montage player.
 
 MontagePlayer (const MontagePlayer &)=delete
 
MontagePlayer & operator= (const MontagePlayer &)=delete
 
Result< void > prepare (action::ActionTimeline timeline, std::vector< MontageClipAsset > &&clips)
 Validate and atomically replace the complete montage presentation.
 
Result< void > prepare (action::ActionTimeline timeline, IMontageClipProvider &provider)
 Resolve every distinct section URI and atomically prepare the montage.
 
Result< void > reloadClips (IMontageClipProvider &provider)
 Transactionally reload every referenced clip while preserving playback state.
 
Result< void > setSettings (action::ActionMontageSettings settings)
 Apply validated montage-wide settings without rebuilding clip topology or playback time.
 
Result< void > setSectionSplits (std::vector< Duration > splitTimestamps)
 Atomically replace objective physical-section split timestamps without rebuilding clip topology.
 
Result< void > replaceClip (std::string_view uri, std::unique_ptr< AnimClip > clip)
 Transactionally replace one URI-backed clip and preserve the current cursor and slot weight.
 
Result< void > play (action::ActionExecutionId executionId)
 Bind presentation playback to one authoritative ActionRuntime execution.
 
Result< void > rebindExecution (action::ActionExecutionId executionId)
 Rebind an already playing presentation after its external gameplay authority is recreated.
 
Result< MontageAdvance > present (const action::ActionAdvance &advance, SimulationTick tick)
 Present one ActionRuntime-owned advance without advancing gameplay time locally.
 
Result< MontageAdvance > present (action::ActionAdvance &&advance, SimulationTick tick)
 Present an authoritative advance while transferring its owning timeline projections.
 
Result< MontageAdvance > jumpToTime (action::ActionExecutionId executionId, Duration target, SimulationTick tick)
 Atomically realign presentation and active state blocks to an externally authoritative timestamp.
 
Result< MontageAdvance > jumpToSection (action::ActionExecutionId executionId, std::size_t sectionIndex, SimulationTick tick)
 Jump presentation to the start of one objective physical section.
 
Result< MontageAdvance > evaluateSectionProgress (action::ActionExecutionId executionId, std::size_t sectionIndex, double progress, SimulationTick tick)
 Evaluate a normalized physical-section progress and atomically realign presentation.
 
Result< std::size_t > physicalSectionIndex () const
 Resolve the objective physical section containing the current cursor.
 
Result< double > physicalSectionProgress (std::size_t sectionIndex) const
 Return current normalized progress within an objective physical section.
 
Result< MontageAdvance > interrupt (SimulationTick tick)
 Interrupt playback and emit paired exits for every active state block.
 
Result< MontageAdvance > beginBlendOut (Duration duration, SimulationTick tick)
 Enter continuous blend-out and emit exits for every active state block.
 
Result< MontageAdvance > advanceBlendOut (Duration delta, SimulationTick tick)
 Advance an active blend-out without advancing gameplay or montage time.
 
void stop () noexcept
 Stop playback and reset the derived cursor.
 
void setRootMotionReceiver (IMontageRootMotionReceiver &receiver) noexcept
 Install a borrowed root-motion receiver.
 
void clearRootMotionReceiver () noexcept
 Clear the borrowed root-motion receiver before its owner is destroyed.
 
void setRootMotionMask (MontageRootMotionMask mask) noexcept
 Compatibility setter for axis enable bits.
 
MontageRootMotionMask getRootMotionMask () const noexcept
 Compatibility projection of the active policy lock bits.
 
Result< void > setRootMotionPolicy (const RootMotionPolicy &policy)
 Replace the canonical root-motion policy used by presentation and the owned AnimPlayer.
 
RootMotionPolicy getRootMotionPolicy () const noexcept
 Copy of the active root-motion policy.
 
Result< void > setRootMotionCharacterYaw (float yawRadians)
 Update CharacterFacing yaw without replacing bake/lock/apply-space.
 
void setGapPolicy (MontageGapPolicy policy) noexcept
 Select the explicit pose policy used in gaps between animation sections.
 
AnimPose & pose ()
 Borrow the current evaluated pose.
 
Duration time () const noexcept
 Current derived montage presentation time.
 
bool isPlaying () const noexcept
 Whether the prepared montage is actively playing.
 
bool isBlendingOut () const noexcept
 Whether playback is in externally requested blend-out.
 
bool isFinished () const noexcept
 Whether playback completed naturally while retaining its final weighted pose.
 
double weight () const noexcept
 Current continuous montage slot weight.
 
std::size_t animationLayer () const noexcept
 Authored output layer requested by the prepared montage, or zero before preparation.
 
bool footIkEnabled () const noexcept
 Whether the host should run its terrain-specific foot-IK provider after this pose.
 

详细描述

Presentation-only montage player over an ActionTimeline.

ActionRuntime remains the sole gameplay lifecycle authority. This object owns all resolved clips and only keeps a derived presentation cursor. It is owner-thread-only, reads no wall clock, and invokes the optional receiver without holding a lock.

在文件 MontagePlayer.h 第 108 行定义.

构造及析构函数说明

◆ MontagePlayer() [1/2]

eve::animation::MontagePlayer::MontagePlayer ( AnimSkeleton &  skeleton)
explicit

Borrow a skeleton that must outlive this player.

在文件 MontagePlayer.cpp 第 108 行定义.

◆ ~MontagePlayer()

eve::animation::MontagePlayer::~MontagePlayer ( )
default

Montage player.

◆ MontagePlayer() [2/2]

eve::animation::MontagePlayer::MontagePlayer ( const MontagePlayer &  )
delete

成员函数说明

◆ advanceBlendOut()

◆ animationLayer()

std::size_t eve::animation::MontagePlayer::animationLayer ( ) const
inlinenoexcept

Authored output layer requested by the prepared montage, or zero before preparation.

在文件 MontagePlayer.h 第 238 行定义.

◆ beginBlendOut()

◆ clearRootMotionReceiver()

void eve::animation::MontagePlayer::clearRootMotionReceiver ( )
inlinenoexcept

Clear the borrowed root-motion receiver before its owner is destroyed.

在文件 MontagePlayer.h 第 199 行定义.

◆ evaluateSectionProgress()

Result< MontageAdvance > eve::animation::MontagePlayer::evaluateSectionProgress ( action::ActionExecutionId  executionId,
std::size_t  sectionIndex,
double  progress,
SimulationTick  tick 
)

Evaluate a normalized physical-section progress and atomically realign presentation.

在文件 MontagePlayer.cpp 第 598 行定义.

引用了 executionId, eve::Duration::fromNanoseconds(), jumpToTime(), range, target , 以及 tick.

◆ footIkEnabled()

bool eve::animation::MontagePlayer::footIkEnabled ( ) const
inlinenoexcept

Whether the host should run its terrain-specific foot-IK provider after this pose.

在文件 MontagePlayer.h 第 242 行定义.

◆ getRootMotionMask()

MontageRootMotionMask eve::animation::MontagePlayer::getRootMotionMask ( ) const
inlinenoexcept

Compatibility projection of the active policy lock bits.

在文件 MontagePlayer.h 第 207 行定义.

◆ getRootMotionPolicy()

RootMotionPolicy eve::animation::MontagePlayer::getRootMotionPolicy ( ) const
inlinenoexcept

Copy of the active root-motion policy.

在文件 MontagePlayer.h 第 215 行定义.

◆ interrupt()

Result< MontageAdvance > eve::animation::MontagePlayer::interrupt ( SimulationTick  tick)

◆ isBlendingOut()

bool eve::animation::MontagePlayer::isBlendingOut ( ) const
inlinenoexcept

Whether playback is in externally requested blend-out.

在文件 MontagePlayer.h 第 230 行定义.

◆ isFinished()

bool eve::animation::MontagePlayer::isFinished ( ) const
inlinenoexcept

Whether playback completed naturally while retaining its final weighted pose.

在文件 MontagePlayer.h 第 232 行定义.

◆ isPlaying()

bool eve::animation::MontagePlayer::isPlaying ( ) const
inlinenoexcept

Whether the prepared montage is actively playing.

在文件 MontagePlayer.h 第 228 行定义.

◆ jumpToSection()

Result< MontageAdvance > eve::animation::MontagePlayer::jumpToSection ( action::ActionExecutionId  executionId,
std::size_t  sectionIndex,
SimulationTick  tick 
)

Jump presentation to the start of one objective physical section.

在文件 MontagePlayer.cpp 第 590 行定义.

引用了 executionId, jumpToTime() , 以及 tick.

◆ jumpToTime()

Result< MontageAdvance > eve::animation::MontagePlayer::jumpToTime ( action::ActionExecutionId  executionId,
Duration  target,
SimulationTick  tick 
)

Atomically realign presentation and active state blocks to an externally authoritative timestamp.

备注
This does not advance ActionRuntime; the caller must align its gameplay authority separately.

在文件 MontagePlayer.cpp 第 552 行定义.

引用了 active, eve::Applied, eve::Conflict, eve::Diagnostic::error(), executionId, eve::Result< T >::failure(), eve::Duration::fromNanoseconds(), eve::action::ActionAnimationSection::id, eve::InvalidArgument, eve::Duration::nanoseconds(), eve::animation::MontageAdvance::previous, result, eve::action::ActionAnimationSection::start, eve::Status::success(), eve::Result< T >::success(), target, tick , 以及 eve::Duration::zero().

被这些函数引用 evaluateSectionProgress() , 以及 jumpToSection().

◆ operator=()

MontagePlayer & eve::animation::MontagePlayer::operator= ( const MontagePlayer &  )
delete

◆ physicalSectionIndex()

Result< std::size_t > eve::animation::MontagePlayer::physicalSectionIndex ( ) const

Resolve the objective physical section containing the current cursor.

在文件 MontagePlayer.cpp 第 613 行定义.

引用了 found, index, range, eve::Result< T >::success() , 以及 value.

◆ physicalSectionProgress()

Result< double > eve::animation::MontagePlayer::physicalSectionProgress ( std::size_t  sectionIndex) const

Return current normalized progress within an objective physical section.

在文件 MontagePlayer.cpp 第 623 行定义.

引用了 eve::Duration::nanoseconds(), range , 以及 eve::Result< T >::success().

◆ play()

Result< void > eve::animation::MontagePlayer::play ( action::ActionExecutionId  executionId)

◆ pose()

AnimPose & eve::animation::MontagePlayer::pose ( )

Borrow the current evaluated pose.

在文件 MontagePlayer.cpp 第 738 行定义.

◆ prepare() [1/2]

Result< void > eve::animation::MontagePlayer::prepare ( action::ActionTimeline  timeline,
IMontageClipProvider &  provider 
)

Resolve every distinct section URI and atomically prepare the montage.

参数
providerBorrowed only for this synchronous call and never retained.

在文件 MontagePlayer.cpp 第 115 行定义.

引用了 eve::action::ActionTimeline::animationSections, eve::Result< T >::failure(), loaded, prepare(), provider, valid , 以及 eve::action::ActionTimeline::validate().

◆ prepare() [2/2]

Result< void > eve::animation::MontagePlayer::prepare ( action::ActionTimeline  timeline,
std::vector< MontageClipAsset > &&  clips 
)

Validate and atomically replace the complete montage presentation.

参数
timelineCanonical owning timeline copied into the player.
clipsClip ownership transferred only on success.

在文件 MontagePlayer.cpp 第 129 行定义.

引用了 eve::action::ActionTimeline::animationSections, eve::Applied, clip, eve::Diagnostic::error(), eve::Result< T >::failure(), index, eve::InvalidArgument, eve::Status::success(), eve::Result< T >::success(), uri, valid, eve::action::ActionTimeline::validate(), eve::detail::StrongUint64< detail::SimulationTickTag >::zero() , 以及 eve::Duration::zero().

被这些函数引用 prepare() , 以及 reloadClips().

◆ present() [1/2]

Result< MontageAdvance > eve::animation::MontagePlayer::present ( action::ActionAdvance &&  advance,
SimulationTick  tick 
)

Present an authoritative advance while transferring its owning timeline projections.

参数
advanceConsumed owning observation; timelineEvents and activeBlocks are moved into the result.
tickStrictly increasing simulation tick associated with the observation.
返回
Owning presentation result, without copying the transferred event and active-block vectors.
备注
Owner-thread-only. The moved-from advance remains valid with unspecified projection contents.

在文件 MontagePlayer.cpp 第 448 行定义.

引用了 events , 以及 tick.

◆ present() [2/2]

Result< MontageAdvance > eve::animation::MontagePlayer::present ( const action::ActionAdvance &  advance,
SimulationTick  tick 
)

Present one ActionRuntime-owned advance without advancing gameplay time locally.

参数
advanceOwning observation returned by ActionRuntime::advance.
tickStrictly increasing simulation tick associated with the observation.

在文件 MontagePlayer.cpp 第 444 行定义.

引用了 eve::action::ActionAdvance::activeBlocks, tick , 以及 eve::action::ActionAdvance::timelineEvents.

◆ rebindExecution()

Result< void > eve::animation::MontagePlayer::rebindExecution ( action::ActionExecutionId  executionId)

Rebind an already playing presentation after its external gameplay authority is recreated.

在文件 MontagePlayer.cpp 第 297 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), executionId, eve::Result< T >::failure(), eve::InvalidArgument, eve::detail::StrongUint64< Tag >::isZero(), eve::Status::success() , 以及 eve::Result< T >::success().

◆ reloadClips()

Result< void > eve::animation::MontagePlayer::reloadClips ( IMontageClipProvider &  provider)

Transactionally reload every referenced clip while preserving playback state.

参数
providerBorrowed synchronous provider; no replacement is committed unless all clips validate.

在文件 MontagePlayer.cpp 第 186 行定义.

引用了 eve::Applied, duration, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::Duration::fromNanoseconds(), eve::InvalidArgument, loaded, eve::Duration::nanoseconds(), prepare(), provider, eve::Status::success() , 以及 eve::Result< T >::success().

◆ replaceClip()

Result< void > eve::animation::MontagePlayer::replaceClip ( std::string_view  uri,
std::unique_ptr< AnimClip >  clip 
)

◆ setGapPolicy()

void eve::animation::MontagePlayer::setGapPolicy ( MontageGapPolicy  policy)
inlinenoexcept

Select the explicit pose policy used in gaps between animation sections.

在文件 MontagePlayer.h 第 222 行定义.

◆ setRootMotionCharacterYaw()

Result< void > eve::animation::MontagePlayer::setRootMotionCharacterYaw ( float  yawRadians)

Update CharacterFacing yaw without replacing bake/lock/apply-space.

返回
Applied on success; InvalidArgument when yaw is non-finite.

在文件 MontagePlayer.cpp 第 437 行定义.

引用了 eve::Applied, applied, eve::animation::RootMotionPolicy::characterYaw, eve::Status::success() , 以及 eve::Result< T >::success().

◆ setRootMotionMask()

void eve::animation::MontagePlayer::setRootMotionMask ( MontageRootMotionMask  mask)
noexcept

Compatibility setter for axis enable bits.

Updates RootMotionPolicy lockAxes / lockRotation and pushes the policy into the owned AnimPlayer. Bake / apply-space / yaw are preserved.

在文件 MontagePlayer.cpp 第 420 行定义.

引用了 mask.

◆ setRootMotionPolicy()

Result< void > eve::animation::MontagePlayer::setRootMotionPolicy ( const RootMotionPolicy &  policy)

Replace the canonical root-motion policy used by presentation and the owned AnimPlayer.

返回
Applied on success; InvalidArgument leaves the previous policy unchanged. @thread Owner thread only; no callbacks or reentrancy.

在文件 MontagePlayer.cpp 第 427 行定义.

引用了 eve::Applied, eve::Status::success(), eve::Result< T >::success() , 以及 eve::animation::validateRootMotionPolicy().

◆ setRootMotionReceiver()

void eve::animation::MontagePlayer::setRootMotionReceiver ( IMontageRootMotionReceiver &  receiver)
inlinenoexcept

Install a borrowed root-motion receiver.

参数
receiverReceiver that must outlive this player or be cleared before destruction. @lifetime The player retains a non-owning observer until clearRootMotionReceiver() is called.

在文件 MontagePlayer.h 第 197 行定义.

◆ setSectionSplits()

Result< void > eve::animation::MontagePlayer::setSectionSplits ( std::vector< Duration >  splitTimestamps)

Atomically replace objective physical-section split timestamps without rebuilding clip topology.

参数
splitTimestampsStrictly ordered boundaries inside the prepared montage duration.
返回
Applied, or a structured validation/state failure with the previous boundaries preserved.

在文件 MontagePlayer.cpp 第 228 行定义.

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

◆ setSettings()

Result< void > eve::animation::MontagePlayer::setSettings ( action::ActionMontageSettings  settings)

Apply validated montage-wide settings without rebuilding clip topology or playback time.

参数
settingsCandidate settings validated against the prepared timeline before publication.
返回
Applied, or a structured validation/state failure with no observable mutation.

在文件 MontagePlayer.cpp 第 215 行定义.

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

◆ stop()

void eve::animation::MontagePlayer::stop ( )
noexcept

Stop playback and reset the derived cursor.

在文件 MontagePlayer.cpp 第 308 行定义.

引用了 eve::Duration::zero().

◆ time()

Duration eve::animation::MontagePlayer::time ( ) const
inlinenoexcept

Current derived montage presentation time.

在文件 MontagePlayer.h 第 226 行定义.

◆ weight()

double eve::animation::MontagePlayer::weight ( ) const
inlinenoexcept

Current continuous montage slot weight.

在文件 MontagePlayer.h 第 236 行定义.


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