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

Keyframed skeletal animation clip (local TRS tracks per bone). Script type: AnimClip. 更多...

#include <AnimClip.h>

Public 成员函数

 AnimClip (std::string name="")
 Anim clip.
 
 ~AnimClip ()
 Anim clip.
 
 AnimClip (const AnimClip &)=delete
 
AnimClip & operator= (const AnimClip &)=delete
 
void setName (const std::string &name)
 Sets the name.
 
std::string getName () const
 Returns the name.
 
void setDuration (float seconds)
 Sets the duration.
 
float getDuration () const
 Returns the duration.
 
void setLoop (bool loop)
 Sets the loop.
 
bool getLoop () const
 Returns the loop.
 
void setSampleRate (float hz)
 Sample rate hint used by MotionDatabase baking (Hz).
 
float getSampleRate () const
 Returns the sample rate.
 
void addPositionKey (int boneIndex, float time, float x, float y, float z)
 Adds position key.
 
void addRotationKey (int boneIndex, float time, float x, float y, float z, float w)
 Adds rotation key.
 
void addScaleKey (int boneIndex, float time, float x, float y, float z)
 Adds scale key.
 
bool setPositionKey (int boneIndex, int keyIndex, float time, float x, float y, float z)
 Replace and re-sort one position key.
 
bool setRotationKey (int boneIndex, int keyIndex, float time, float x, float y, float z, float w)
 Replace and re-sort one rotation key.
 
bool setScaleKey (int boneIndex, int keyIndex, float time, float x, float y, float z)
 Replace and re-sort one scale key.
 
bool removePositionKey (int boneIndex, int keyIndex)
 Delete one position key.
 
bool removeRotationKey (int boneIndex, int keyIndex)
 Delete one rotation key.
 
bool removeScaleKey (int boneIndex, int keyIndex)
 Delete one scale key.
 
bool clearTrack (int boneIndex)
 Clear every transform channel for one bone.
 
int getTrackCount () const
 Return the number of allocated bone tracks, including empty tracks.
 
void addEvent (float time, const std::string &name, const std::string &payload="")
 Add a named event marker at clip-local time. Events are kept time-sorted.
 
bool setEvent (int index, float time, const std::string &name, const std::string &payload="")
 Replace and re-sort one event marker.
 
bool removeEvent (int index)
 Delete one event marker.
 
int getEventCount () const
 Return the number of event markers.
 
float getEventTime (int index) const
 Return an event marker's time, or 0 for an invalid index.
 
std::string getEventName (int index) const
 Return an event marker's name, or empty for an invalid index.
 
std::string getEventPayload (int index) const
 Return an event marker's optional payload.
 
bool hasEvent (std::string_view name) const noexcept
 Whether this clip contains at least one event with the stable semantic name.
 
eve::Result< void > validateNotifyContract (const std::vector< std::string > &requiredNames) const
 Validates that every required semantic notify exists before gameplay registration.
 
void addSyncMarker (float time, const std::string &name)
 Add a named locomotion sync marker at clip-local time.
 
bool setSyncMarker (int index, float time, const std::string &name)
 Replace and re-sort one sync marker.
 
bool removeSyncMarker (int index)
 Delete one sync marker.
 
int getSyncMarkerCount () const
 Return the number of locomotion sync markers.
 
float getSyncMarkerTime (int index) const
 Return a sync marker's time, or 0 for an invalid index.
 
std::string getSyncMarkerName (int index) const
 Return a sync marker's name, or empty for an invalid index.
 
bool hasCompatibleSyncMarkers (const AnimClip *target) const
 Whether this clip and target share a usable ordered marker interval.
 
float mapSyncTimeTo (float time, const AnimClip *target) const
 Map local time into target marker space, falling back to normalized duration.
 
int getPositionKeyCount (int boneIndex) const
 Returns the position key count.
 
int getRotationKeyCount (int boneIndex) const
 Returns the rotation key count.
 
int getScaleKeyCount (int boneIndex) const
 Returns the scale key count.
 
float getPositionKeyTime (int boneIndex, int keyIndex) const
 Returns the position key time.
 
float getPositionKeyX (int boneIndex, int keyIndex) const
 Returns the position key x.
 
float getPositionKeyY (int boneIndex, int keyIndex) const
 Returns the position key y.
 
float getPositionKeyZ (int boneIndex, int keyIndex) const
 Returns the position key z.
 
float getRotationKeyTime (int boneIndex, int keyIndex) const
 Returns the rotation key time.
 
float getRotationKeyX (int boneIndex, int keyIndex) const
 Returns the rotation key x.
 
float getRotationKeyY (int boneIndex, int keyIndex) const
 Returns the rotation key y.
 
float getRotationKeyZ (int boneIndex, int keyIndex) const
 Returns the rotation key z.
 
float getRotationKeyW (int boneIndex, int keyIndex) const
 Returns the rotation key w.
 
float getScaleKeyTime (int boneIndex, int keyIndex) const
 Returns the scale key time.
 
float getScaleKeyX (int boneIndex, int keyIndex) const
 Returns the scale key x.
 
float getScaleKeyY (int boneIndex, int keyIndex) const
 Returns the scale key y.
 
float getScaleKeyZ (int boneIndex, int keyIndex) const
 Returns the scale key z.
 
void applyPlanarRootMotion (int boneIndex, float speedX, float speedZ)
 Bake planar root motion onto an existing position track (or create one). For each position key at time t: x += speedX * t, z += speedZ * t. Useful when source clips are Mixamo in-place locomotion.
 
int compress (float positionError=0.001f, float rotationErrorDegrees=0.1f, float scaleError=0.001f)
 Remove interpolation-redundant keys while keeping sampled error below the supplied tolerances.
 
AnimClip * retarget (const AnimSkeleton *sourceSkeleton, const AnimSkeleton *targetSkeleton) const
 Bake this clip onto a target skeleton by matching bone names and preserving bind-pose deltas. Translation motion is scaled by the corresponding target/source bind-bone length ratio.
 
AnimClip * retargetWithProfile (const AnimSkeleton *sourceSkeleton, const AnimSkeleton *targetSkeleton, AnimRetargetProfile *profile) const
 Retarget using an Avatar-like mapping/profile and update its diagnostics. Skeleton-space rotation preserves motion when source and target local bone axes differ. The output is baked at this clip's sample rate so parent-space corrections remain stable.
 
void sample (float time, AnimPose *out, const AnimSkeleton *skeleton=nullptr) const
 Sample local pose at time (seconds). If skeleton non-null, missing tracks fall back to bind pose; otherwise identity.
 
void sampleLod (float time, AnimPose *out, const AnimSkeleton *skeleton, int lodLevel) const
 Sample only bones enabled for lodLevel; culled tracks use target bind pose.
 
float wrapTime (float time) const
 Wrap or clamp time according to loop flag.
 
std::unique_ptr< AnimClip > clone () const
 Return a fully owning deep copy suitable for runtime hot replacement.
 
void adopt (AnimClip &other)
 Replace this clip's content with other's (payload moved, not copied). Used by hot reload so registered clip instances keep their identity while their content is refreshed. other is left drained and is destroyed by the caller.
 
void collectEvents (float previousTime, float currentTime, bool loop, std::vector< std::string > &out) const
 Collect notifies crossed by forward playback, including loop wrap.
 

友元

class AnimPlayer
 
class MotionDatabase
 
class AnimClipBinaryAccess
 

详细描述

Keyframed skeletal animation clip (local TRS tracks per bone). Script type: AnimClip.

在文件 AnimClip.h 第 145 行定义.

构造及析构函数说明

◆ AnimClip() [1/2]

eve::animation::AnimClip::AnimClip ( std::string  name = "")
explicit

Anim clip.

在文件 AnimClip.cpp 第 18 行定义.

◆ ~AnimClip()

eve::animation::AnimClip::~AnimClip ( )

Anim clip.

在文件 AnimClip.cpp 第 20 行定义.

引用了 eve::animation::AnimClipRegistry::unregister().

◆ AnimClip() [2/2]

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

成员函数说明

◆ addEvent()

void eve::animation::AnimClip::addEvent ( float  time,
const std::string &  name,
const std::string &  payload = "" 
)

Add a named event marker at clip-local time. Events are kept time-sorted.

在文件 AnimClip.cpp 第 155 行定义.

引用了 a, b, name, payload , 以及 time.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ addPositionKey()

void eve::animation::AnimClip::addPositionKey ( int  boneIndex,
float  time,
float  x,
float  y,
float  z 
)

Adds position key.

在文件 AnimClip.cpp 第 45 行定义.

引用了 a, b, positions, time, x, y , 以及 z.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ addRotationKey()

void eve::animation::AnimClip::addRotationKey ( int  boneIndex,
float  time,
float  x,
float  y,
float  z,
float  w 
)

◆ addScaleKey()

void eve::animation::AnimClip::addScaleKey ( int  boneIndex,
float  time,
float  x,
float  y,
float  z 
)

Adds scale key.

在文件 AnimClip.cpp 第 76 行定义.

引用了 a, b, scales, time, x, y , 以及 z.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ addSyncMarker()

void eve::animation::AnimClip::addSyncMarker ( float  time,
const std::string &  name 
)

Add a named locomotion sync marker at clip-local time.

在文件 AnimClip.cpp 第 216 行定义.

引用了 a, b, name , 以及 time.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ adopt()

void eve::animation::AnimClip::adopt ( AnimClip &  other)

Replace this clip's content with other's (payload moved, not copied). Used by hot reload so registered clip instances keep their identity while their content is refreshed. other is left drained and is destroyed by the caller.

在文件 AnimClip.cpp 第 981 行定义.

被这些函数引用 eve::animation::loadAnimationTracks().

◆ applyPlanarRootMotion()

void eve::animation::AnimClip::applyPlanarRootMotion ( int  boneIndex,
float  speedX,
float  speedZ 
)

Bake planar root motion onto an existing position track (or create one). For each position key at time t: x += speedX * t, z += speedZ * t. Useful when source clips are Mixamo in-place locomotion.

在文件 AnimClip.cpp 第 443 行定义.

引用了 end, positions , 以及 start.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ clearTrack()

bool eve::animation::AnimClip::clearTrack ( int  boneIndex)

Clear every transform channel for one bone.

返回
False when the bone index is invalid.

在文件 AnimClip.cpp 第 149 行定义.

引用了 getTrackCount().

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ clone()

std::unique_ptr< AnimClip > eve::animation::AnimClip::clone ( ) const

Return a fully owning deep copy suitable for runtime hot replacement.

在文件 AnimClip.cpp 第 481 行定义.

◆ collectEvents()

void eve::animation::AnimClip::collectEvents ( float  previousTime,
float  currentTime,
bool  loop,
std::vector< std::string > &  out 
) const

Collect notifies crossed by forward playback, including loop wrap.

在文件 AnimClip.cpp 第 348 行定义.

引用了 from, loop, to , 以及 wrapTime().

◆ compress()

int eve::animation::AnimClip::compress ( float  positionError = 0.001f,
float  rotationErrorDegrees = 0.1f,
float  scaleError = 0.001f 
)

Remove interpolation-redundant keys while keeping sampled error below the supplied tolerances.

参数
positionErrorMaximum local translation error in engine units.
rotationErrorDegreesMaximum local angular error in degrees.
scaleErrorMaximum local scale-vector error.
返回
Number of removed keys.

在文件 AnimClip.cpp 第 602 行定义.

引用了 eve::animation::clampf(), dx, dy, dz, error, first, eve::animation::lerpf(), removed, eve::animation::slerpQuat(), split, w, x, y , 以及 z.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ getDuration()

◆ getEventCount()

int eve::animation::AnimClip::getEventCount ( ) const
inline

Return the number of event markers.

在文件 AnimClip.h 第 204 行定义.

被这些函数引用 eve::animation::exposeAnimClipBindings(), getEventName(), getEventPayload(), getEventTime(), eve::animation::AnimPlayer::play(), removeEvent() , 以及 setEvent().

◆ getEventName()

std::string eve::animation::AnimClip::getEventName ( int  index) const

Return an event marker's name, or empty for an invalid index.

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

引用了 getEventCount(), index , 以及 name.

被这些函数引用 eve::animation::exposeAnimClipBindings() , 以及 eve::animation::AnimPlayer::play().

◆ getEventPayload()

std::string eve::animation::AnimClip::getEventPayload ( int  index) const

Return an event marker's optional payload.

在文件 AnimClip.cpp 第 191 行定义.

引用了 getEventCount(), index , 以及 payload.

被这些函数引用 eve::animation::exposeAnimClipBindings() , 以及 eve::animation::AnimPlayer::play().

◆ getEventTime()

float eve::animation::AnimClip::getEventTime ( int  index) const

Return an event marker's time, or 0 for an invalid index.

在文件 AnimClip.cpp 第 181 行定义.

引用了 getEventCount(), index , 以及 t.

被这些函数引用 eve::animation::exposeAnimClipBindings() , 以及 eve::animation::AnimPlayer::play().

◆ getLoop()

bool eve::animation::AnimClip::getLoop ( ) const
inline

◆ getName()

std::string eve::animation::AnimClip::getName ( ) const
inline

Returns the name.

在文件 AnimClip.h 第 158 行定义.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ getPositionKeyCount()

int eve::animation::AnimClip::getPositionKeyCount ( int  boneIndex) const

Returns the position key count.

在文件 AnimClip.cpp 第 365 行定义.

引用了 positions.

被这些函数引用 eve::animation::exposeAnimClipBindings(), getPositionKeyTime(), getPositionKeyX(), getPositionKeyY() , 以及 getPositionKeyZ().

◆ getPositionKeyTime()

float eve::animation::AnimClip::getPositionKeyTime ( int  boneIndex,
int  keyIndex 
) const

Returns the position key time.

在文件 AnimClip.cpp 第 388 行定义.

引用了 getPositionKeyCount() , 以及 positions.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ getPositionKeyX()

float eve::animation::AnimClip::getPositionKeyX ( int  boneIndex,
int  keyIndex 
) const

Returns the position key x.

在文件 AnimClip.cpp 第 392 行定义.

引用了 getPositionKeyCount() , 以及 positions.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ getPositionKeyY()

float eve::animation::AnimClip::getPositionKeyY ( int  boneIndex,
int  keyIndex 
) const

Returns the position key y.

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

引用了 getPositionKeyCount() , 以及 positions.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ getPositionKeyZ()

float eve::animation::AnimClip::getPositionKeyZ ( int  boneIndex,
int  keyIndex 
) const

Returns the position key z.

在文件 AnimClip.cpp 第 400 行定义.

引用了 getPositionKeyCount() , 以及 positions.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ getRotationKeyCount()

int eve::animation::AnimClip::getRotationKeyCount ( int  boneIndex) const

Returns the rotation key count.

在文件 AnimClip.cpp 第 370 行定义.

被这些函数引用 eve::animation::exposeAnimClipBindings(), getRotationKeyTime(), getRotationKeyW(), getRotationKeyX(), getRotationKeyY() , 以及 getRotationKeyZ().

◆ getRotationKeyTime()

float eve::animation::AnimClip::getRotationKeyTime ( int  boneIndex,
int  keyIndex 
) const

Returns the rotation key time.

在文件 AnimClip.cpp 第 405 行定义.

引用了 getRotationKeyCount().

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ getRotationKeyW()

float eve::animation::AnimClip::getRotationKeyW ( int  boneIndex,
int  keyIndex 
) const

Returns the rotation key w.

在文件 AnimClip.cpp 第 421 行定义.

引用了 getRotationKeyCount().

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ getRotationKeyX()

float eve::animation::AnimClip::getRotationKeyX ( int  boneIndex,
int  keyIndex 
) const

Returns the rotation key x.

在文件 AnimClip.cpp 第 409 行定义.

引用了 getRotationKeyCount().

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ getRotationKeyY()

float eve::animation::AnimClip::getRotationKeyY ( int  boneIndex,
int  keyIndex 
) const

Returns the rotation key y.

在文件 AnimClip.cpp 第 413 行定义.

引用了 getRotationKeyCount().

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ getRotationKeyZ()

float eve::animation::AnimClip::getRotationKeyZ ( int  boneIndex,
int  keyIndex 
) const

Returns the rotation key z.

在文件 AnimClip.cpp 第 417 行定义.

引用了 getRotationKeyCount().

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ getSampleRate()

float eve::animation::AnimClip::getSampleRate ( ) const
inline

Returns the sample rate.

在文件 AnimClip.h 第 173 行定义.

被这些函数引用 eve::animation::buildSmrFeatures() , 以及 eve::animation::exposeAnimClipBindings().

◆ getScaleKeyCount()

int eve::animation::AnimClip::getScaleKeyCount ( int  boneIndex) const

Returns the scale key count.

在文件 AnimClip.cpp 第 375 行定义.

引用了 scales.

被这些函数引用 eve::animation::exposeAnimClipBindings(), getScaleKeyTime(), getScaleKeyX(), getScaleKeyY() , 以及 getScaleKeyZ().

◆ getScaleKeyTime()

float eve::animation::AnimClip::getScaleKeyTime ( int  boneIndex,
int  keyIndex 
) const

Returns the scale key time.

在文件 AnimClip.cpp 第 426 行定义.

引用了 getScaleKeyCount() , 以及 scales.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ getScaleKeyX()

float eve::animation::AnimClip::getScaleKeyX ( int  boneIndex,
int  keyIndex 
) const

Returns the scale key x.

在文件 AnimClip.cpp 第 430 行定义.

引用了 getScaleKeyCount() , 以及 scales.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ getScaleKeyY()

float eve::animation::AnimClip::getScaleKeyY ( int  boneIndex,
int  keyIndex 
) const

Returns the scale key y.

在文件 AnimClip.cpp 第 434 行定义.

引用了 getScaleKeyCount() , 以及 scales.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ getScaleKeyZ()

float eve::animation::AnimClip::getScaleKeyZ ( int  boneIndex,
int  keyIndex 
) const

Returns the scale key z.

在文件 AnimClip.cpp 第 438 行定义.

引用了 getScaleKeyCount() , 以及 scales.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ getSyncMarkerCount()

int eve::animation::AnimClip::getSyncMarkerCount ( ) const
inline

Return the number of locomotion sync markers.

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

被这些函数引用 eve::animation::exposeAnimClipBindings(), getSyncMarkerName(), getSyncMarkerTime(), removeSyncMarker() , 以及 setSyncMarker().

◆ getSyncMarkerName()

std::string eve::animation::AnimClip::getSyncMarkerName ( int  index) const

Return a sync marker's name, or empty for an invalid index.

在文件 AnimClip.cpp 第 247 行定义.

引用了 getSyncMarkerCount(), index , 以及 name.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ getSyncMarkerTime()

float eve::animation::AnimClip::getSyncMarkerTime ( int  index) const

Return a sync marker's time, or 0 for an invalid index.

在文件 AnimClip.cpp 第 242 行定义.

引用了 getSyncMarkerCount(), index , 以及 t.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ getTrackCount()

int eve::animation::AnimClip::getTrackCount ( ) const
inline

Return the number of allocated bone tracks, including empty tracks.

在文件 AnimClip.h 第 196 行定义.

被这些函数引用 clearTrack(), eve::animation::exposeAnimClipBindings(), removePositionKey(), removeRotationKey(), removeScaleKey(), setPositionKey(), setRotationKey() , 以及 setScaleKey().

◆ hasCompatibleSyncMarkers()

bool eve::animation::AnimClip::hasCompatibleSyncMarkers ( const AnimClip *  target) const

Whether this clip and target share a usable ordered marker interval.

在文件 AnimClip.cpp 第 252 行定义.

引用了 name, previous , 以及 target.

被这些函数引用 eve::animation::AnimSyncGroup::advance(), eve::animation::exposeAnimClipBindings() , 以及 mapSyncTimeTo().

◆ hasEvent()

bool eve::animation::AnimClip::hasEvent ( std::string_view  name) const
noexcept

Whether this clip contains at least one event with the stable semantic name.

在文件 AnimClip.cpp 第 196 行定义.

引用了 name.

被这些函数引用 validateNotifyContract().

◆ mapSyncTimeTo()

float eve::animation::AnimClip::mapSyncTimeTo ( float  time,
const AnimClip *  target 
) const

Map local time into target marker space, falling back to normalized duration.

在文件 AnimClip.cpp 第 280 行定义.

引用了 eve::animation::clampf(), distance, hasCompatibleSyncMarkers(), name, t, target, time , 以及 wrapTime().

被这些函数引用 eve::animation::AnimSyncGroup::advance() , 以及 eve::animation::exposeAnimClipBindings().

◆ operator=()

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

◆ removeEvent()

bool eve::animation::AnimClip::removeEvent ( int  index)

Delete one event marker.

返回
False when the event index is invalid.

在文件 AnimClip.cpp 第 175 行定义.

引用了 getEventCount() , 以及 index.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ removePositionKey()

bool eve::animation::AnimClip::removePositionKey ( int  boneIndex,
int  keyIndex 
)

Delete one position key.

返回
False when the bone or key index is invalid.

在文件 AnimClip.cpp 第 125 行定义.

引用了 getTrackCount() , 以及 positions.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ removeRotationKey()

bool eve::animation::AnimClip::removeRotationKey ( int  boneIndex,
int  keyIndex 
)

Delete one rotation key.

返回
False when the bone or key index is invalid.

在文件 AnimClip.cpp 第 133 行定义.

引用了 getTrackCount().

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ removeScaleKey()

bool eve::animation::AnimClip::removeScaleKey ( int  boneIndex,
int  keyIndex 
)

Delete one scale key.

返回
False when the bone or key index is invalid.

在文件 AnimClip.cpp 第 141 行定义.

引用了 getTrackCount() , 以及 scales.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ removeSyncMarker()

bool eve::animation::AnimClip::removeSyncMarker ( int  index)

Delete one sync marker.

返回
False for an invalid index.

在文件 AnimClip.cpp 第 236 行定义.

引用了 getSyncMarkerCount() , 以及 index.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ retarget()

AnimClip * eve::animation::AnimClip::retarget ( const AnimSkeleton *  sourceSkeleton,
const AnimSkeleton *  targetSkeleton 
) const

Bake this clip onto a target skeleton by matching bone names and preserving bind-pose deltas. Translation motion is scaled by the corresponding target/source bind-bone length ratio.

返回
A new script-owned clip.

在文件 AnimClip.cpp 第 806 行定义.

引用了 retargetWithProfile().

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ retargetWithProfile()

AnimClip * eve::animation::AnimClip::retargetWithProfile ( const AnimSkeleton *  sourceSkeleton,
const AnimSkeleton *  targetSkeleton,
AnimRetargetProfile *  profile 
) const

Retarget using an Avatar-like mapping/profile and update its diagnostics. Skeleton-space rotation preserves motion when source and target local bone axes differ. The output is baked at this clip's sample rate so parent-space corrections remain stable.

返回
A new script-owned clip.

在文件 AnimClip.cpp 第 811 行定义.

引用了 eve::animation::AnimSkeleton::applyBindPose(), eve::animation::AnimSkeleton::bindLocal(), eve::animation::AnimPose::computeWorld(), eve::animation::AnimSkeleton::findBone(), eve::animation::AnimSkeleton::getBoneCount(), eve::animation::AnimSkeleton::getBoneName(), eve::animation::AnimSkeleton::getParent(), local, eve::animation::AnimPose::local(), name, parent, positions, eve::animation::TransformTRS::px, eve::animation::TransformTRS::py, eve::animation::TransformTRS::pz, sample(), scales, time , 以及 eve::animation::AnimPose::world().

被这些函数引用 eve::animation::exposeAnimClipBindings() , 以及 retarget().

◆ sample()

void eve::animation::AnimClip::sample ( float  time,
AnimPose *  out,
const AnimSkeleton *  skeleton = nullptr 
) const

Sample local pose at time (seconds). If skeleton non-null, missing tracks fall back to bind pose; otherwise identity.

在文件 AnimClip.cpp 第 575 行定义.

引用了 time , 以及 wrapTime().

被这些函数引用 eve::animation::buildSmrFeatures(), eve::animation::exposeAnimClipBindings(), eve::animation::AnimPlayer::play(), retargetWithProfile(), eve::animation::MotionMatcher::search() , 以及 eve::animation::AnimPlayer::setTime().

◆ sampleLod()

void eve::animation::AnimClip::sampleLod ( float  time,
AnimPose *  out,
const AnimSkeleton *  skeleton,
int  lodLevel 
) const

◆ setDuration()

void eve::animation::AnimClip::setDuration ( float  seconds)

◆ setEvent()

bool eve::animation::AnimClip::setEvent ( int  index,
float  time,
const std::string &  name,
const std::string &  payload = "" 
)

Replace and re-sort one event marker.

返回
False when the event index is invalid.

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

引用了 a, b, getEventCount(), index, name, payload , 以及 time.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ setLoop()

void eve::animation::AnimClip::setLoop ( bool  loop)
inline

Sets the loop.

在文件 AnimClip.h 第 166 行定义.

引用了 loop.

被这些函数引用 eve::animation::exposeAnimClipBindings() , 以及 eve::animation::loadAnimationTracks().

◆ setName()

void eve::animation::AnimClip::setName ( const std::string &  name)
inline

Sets the name.

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

引用了 name.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ setPositionKey()

bool eve::animation::AnimClip::setPositionKey ( int  boneIndex,
int  keyIndex,
float  time,
float  x,
float  y,
float  z 
)

Replace and re-sort one position key.

返回
False when the bone or key index is invalid.

在文件 AnimClip.cpp 第 86 行定义.

引用了 a, b, getTrackCount(), positions, time, x, y , 以及 z.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ setRotationKey()

bool eve::animation::AnimClip::setRotationKey ( int  boneIndex,
int  keyIndex,
float  time,
float  x,
float  y,
float  z,
float  w 
)

Replace and re-sort one rotation key.

返回
False when the bone or key index is invalid.

在文件 AnimClip.cpp 第 97 行定义.

引用了 a, b, getTrackCount(), eve::animation::TransformTRS::normalizeRotation(), eve::animation::TransformTRS::qw, eve::animation::TransformTRS::qx, eve::animation::TransformTRS::qy, eve::animation::TransformTRS::qz, time, w, x, y , 以及 z.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ setSampleRate()

void eve::animation::AnimClip::setSampleRate ( float  hz)

Sample rate hint used by MotionDatabase baking (Hz).

在文件 AnimClip.cpp 第 33 行定义.

被这些函数引用 eve::animation::exposeAnimClipBindings() , 以及 eve::animation::loadAnimationTracks().

◆ setScaleKey()

bool eve::animation::AnimClip::setScaleKey ( int  boneIndex,
int  keyIndex,
float  time,
float  x,
float  y,
float  z 
)

Replace and re-sort one scale key.

返回
False when the bone or key index is invalid.

在文件 AnimClip.cpp 第 114 行定义.

引用了 a, b, getTrackCount(), scales, time, x, y , 以及 z.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ setSyncMarker()

bool eve::animation::AnimClip::setSyncMarker ( int  index,
float  time,
const std::string &  name 
)

Replace and re-sort one sync marker.

返回
False for an invalid index.

在文件 AnimClip.cpp 第 225 行定义.

引用了 a, b, getSyncMarkerCount(), index, name , 以及 time.

被这些函数引用 eve::animation::exposeAnimClipBindings().

◆ validateNotifyContract()

eve::Result< void > eve::animation::AnimClip::validateNotifyContract ( const std::vector< std::string > &  requiredNames) const

Validates that every required semantic notify exists before gameplay registration.

参数
requiredNamesStable notify names such as contact.left_hand or land.
返回
Applied when the contract is complete, otherwise a structured rejection. @thread Owner thread; this call is read-only and does not retain the input span. @reentrancy Does not invoke callbacks or scripts.

在文件 AnimClip.cpp 第 201 行定义.

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

◆ wrapTime()

友元及相关函数文档

◆ AnimClipBinaryAccess

friend class AnimClipBinaryAccess
friend

在文件 AnimClip.h 第 337 行定义.

◆ AnimPlayer

friend class AnimPlayer
friend

在文件 AnimClip.h 第 335 行定义.

◆ MotionDatabase

friend class MotionDatabase
friend

在文件 AnimClip.h 第 336 行定义.


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