载入中...
搜索中...
未找到
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 > 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 第 107 行定义.

构造及析构函数说明

◆ MontagePlayer() [1/2]

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

Borrow a skeleton that must outlive this player.

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

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

◆ beginBlendOut()

◆ clearRootMotionReceiver()

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

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

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

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

引用了 eve::Diagnostic::error(), executionId, eve::Result< T >::failure(), eve::Duration::fromNanoseconds(), eve::InvalidArgument, 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 第 233 行定义.

◆ getRootMotionMask()

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

Compatibility projection of the active policy lock bits.

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

◆ getRootMotionPolicy()

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

Copy of the active root-motion policy.

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

◆ interrupt()

◆ isBlendingOut()

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

Whether playback is in externally requested blend-out.

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

◆ isFinished()

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

Whether playback completed naturally while retaining its final weighted pose.

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

◆ isPlaying()

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

Whether the prepared montage is actively playing.

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

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

引用了 eve::Diagnostic::error(), executionId, eve::Result< T >::failure(), eve::InvalidArgument, jumpToTime(), range, tick , 以及 eve::detail::StrongUint64< Tag >::value().

◆ jumpToTime()

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

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

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

◆ physicalSectionProgress()

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

Return current normalized progress within an objective physical section.

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

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, 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 第 623 行定义.

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

引用了 eve::action::ActionTimeline::animationSections, eve::Result< T >::failure(), eve::animation::IMontageClipProvider::load(), prepare(), 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 第 68 行定义.

引用了 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()

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

◆ rebindExecution()

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

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

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

引用了 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 第 121 行定义.

引用了 eve::Applied, duration, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::Duration::fromNanoseconds(), eve::InvalidArgument, eve::animation::IMontageClipProvider::load(), eve::Duration::nanoseconds(), prepare(), 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 第 213 行定义.

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

引用了 eve::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 第 308 行定义.

引用了 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 第 315 行定义.

引用了 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 第 188 行定义.

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

引用了 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 第 149 行定义.

引用了 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 第 239 行定义.

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

◆ time()

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

Current derived montage presentation time.

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

◆ weight()

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

Current continuous montage slot weight.

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


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