Keyframed skeletal animation clip (local TRS tracks per bone). Script type: AnimClip.
更多...
#include <AnimClip.h>
Public 成员函数 | |
| AnimClip (std::string name="") | |
| ~AnimClip () | |
| AnimClip (const AnimClip &)=delete | |
| AnimClip & | operator= (const AnimClip &)=delete |
| void | setName (const std::string &name) |
| std::string | getName () const |
| void | setDuration (float seconds) |
| float | getDuration () const |
| void | setLoop (bool loop) |
| bool | getLoop () const |
| void | setSampleRate (float hz) |
| Sample rate hint used by MotionDatabase baking (Hz). | |
| float | getSampleRate () const |
| void | addPositionKey (int boneIndex, float time, float x, float y, float z) |
| void | addRotationKey (int boneIndex, float time, float x, float y, float z, float w) |
| void | addScaleKey (int boneIndex, float time, float x, float y, float z) |
| int | getPositionKeyCount (int boneIndex) const |
| int | getRotationKeyCount (int boneIndex) const |
| int | getScaleKeyCount (int boneIndex) const |
| float | getPositionKeyTime (int boneIndex, int keyIndex) const |
| float | getPositionKeyX (int boneIndex, int keyIndex) const |
| float | getPositionKeyY (int boneIndex, int keyIndex) const |
| float | getPositionKeyZ (int boneIndex, int keyIndex) const |
| float | getRotationKeyTime (int boneIndex, int keyIndex) const |
| float | getRotationKeyX (int boneIndex, int keyIndex) const |
| float | getRotationKeyY (int boneIndex, int keyIndex) const |
| float | getRotationKeyZ (int boneIndex, int keyIndex) const |
| float | getRotationKeyW (int boneIndex, int keyIndex) const |
| float | getScaleKeyTime (int boneIndex, int keyIndex) const |
| float | getScaleKeyX (int boneIndex, int keyIndex) const |
| float | getScaleKeyY (int boneIndex, int keyIndex) const |
| float | getScaleKeyZ (int boneIndex, int keyIndex) const |
| 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. | |
| 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. | |
| float | wrapTime (float time) const |
| Wrap or clamp time according to loop flag. | |
| 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. | |
详细描述
Keyframed skeletal animation clip (local TRS tracks per bone). Script type: AnimClip.
在文件 AnimClip.h 第 17 行定义.
构造及析构函数说明
◆ AnimClip() [1/2]
|
explicit |
在文件 AnimClip.cpp 第 14 行定义.
◆ ~AnimClip()
| eve::animation::AnimClip::~AnimClip | ( | ) |
在文件 AnimClip.cpp 第 16 行定义.
◆ AnimClip() [2/2]
|
delete |
成员函数说明
◆ addPositionKey()
| void eve::animation::AnimClip::addPositionKey | ( | int | boneIndex, |
| float | time, | ||
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
在文件 AnimClip.cpp 第 35 行定义.
◆ 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 | ||
| ) |
在文件 AnimClip.cpp 第 66 行定义.
◆ 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 第 289 行定义.
◆ 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 第 154 行定义.
◆ getDuration()
|
inline |
◆ getLoop()
|
inline |
在文件 AnimClip.h 第 32 行定义.
◆ getName()
|
inline |
在文件 AnimClip.h 第 26 行定义.
◆ getPositionKeyCount()
| int eve::animation::AnimClip::getPositionKeyCount | ( | int | boneIndex | ) | const |
在文件 AnimClip.cpp 第 76 行定义.
被这些函数引用 eve::animation::AnimImporter::exportEva(), getPositionKeyTime(), getPositionKeyX(), getPositionKeyY() , 以及 getPositionKeyZ().
◆ getPositionKeyTime()
| float eve::animation::AnimClip::getPositionKeyTime | ( | int | boneIndex, |
| int | keyIndex | ||
| ) | const |
在文件 AnimClip.cpp 第 99 行定义.
◆ getPositionKeyX()
| float eve::animation::AnimClip::getPositionKeyX | ( | int | boneIndex, |
| int | keyIndex | ||
| ) | const |
在文件 AnimClip.cpp 第 103 行定义.
◆ getPositionKeyY()
| float eve::animation::AnimClip::getPositionKeyY | ( | int | boneIndex, |
| int | keyIndex | ||
| ) | const |
在文件 AnimClip.cpp 第 107 行定义.
◆ getPositionKeyZ()
| float eve::animation::AnimClip::getPositionKeyZ | ( | int | boneIndex, |
| int | keyIndex | ||
| ) | const |
在文件 AnimClip.cpp 第 111 行定义.
◆ getRotationKeyCount()
| int eve::animation::AnimClip::getRotationKeyCount | ( | int | boneIndex | ) | const |
在文件 AnimClip.cpp 第 81 行定义.
被这些函数引用 eve::animation::AnimImporter::exportEva(), getRotationKeyTime(), getRotationKeyW(), getRotationKeyX(), getRotationKeyY() , 以及 getRotationKeyZ().
◆ getRotationKeyTime()
| float eve::animation::AnimClip::getRotationKeyTime | ( | int | boneIndex, |
| int | keyIndex | ||
| ) | const |
在文件 AnimClip.cpp 第 116 行定义.
◆ getRotationKeyW()
| float eve::animation::AnimClip::getRotationKeyW | ( | int | boneIndex, |
| int | keyIndex | ||
| ) | const |
在文件 AnimClip.cpp 第 132 行定义.
◆ getRotationKeyX()
| float eve::animation::AnimClip::getRotationKeyX | ( | int | boneIndex, |
| int | keyIndex | ||
| ) | const |
在文件 AnimClip.cpp 第 120 行定义.
◆ getRotationKeyY()
| float eve::animation::AnimClip::getRotationKeyY | ( | int | boneIndex, |
| int | keyIndex | ||
| ) | const |
在文件 AnimClip.cpp 第 124 行定义.
◆ getRotationKeyZ()
| float eve::animation::AnimClip::getRotationKeyZ | ( | int | boneIndex, |
| int | keyIndex | ||
| ) | const |
在文件 AnimClip.cpp 第 128 行定义.
◆ getSampleRate()
|
inline |
在文件 AnimClip.h 第 36 行定义.
被这些函数引用 eve::animation::MotionDatabase::bake() , 以及 eve::animation::AnimImporter::exportEva().
◆ getScaleKeyCount()
| int eve::animation::AnimClip::getScaleKeyCount | ( | int | boneIndex | ) | const |
在文件 AnimClip.cpp 第 86 行定义.
被这些函数引用 eve::animation::AnimImporter::exportEva(), getScaleKeyTime(), getScaleKeyX(), getScaleKeyY() , 以及 getScaleKeyZ().
◆ getScaleKeyTime()
| float eve::animation::AnimClip::getScaleKeyTime | ( | int | boneIndex, |
| int | keyIndex | ||
| ) | const |
在文件 AnimClip.cpp 第 137 行定义.
引用了 getScaleKeyCount().
◆ getScaleKeyX()
| float eve::animation::AnimClip::getScaleKeyX | ( | int | boneIndex, |
| int | keyIndex | ||
| ) | const |
在文件 AnimClip.cpp 第 141 行定义.
引用了 getScaleKeyCount().
◆ getScaleKeyY()
| float eve::animation::AnimClip::getScaleKeyY | ( | int | boneIndex, |
| int | keyIndex | ||
| ) | const |
在文件 AnimClip.cpp 第 145 行定义.
引用了 getScaleKeyCount().
◆ getScaleKeyZ()
| float eve::animation::AnimClip::getScaleKeyZ | ( | int | boneIndex, |
| int | keyIndex | ||
| ) | const |
在文件 AnimClip.cpp 第 149 行定义.
引用了 getScaleKeyCount().
◆ operator=()
◆ 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 第 276 行定义.
引用了 eve::animation::AnimSkeleton::bindLocal(), eve::animation::AnimSkeleton::getBoneCount(), eve::animation::TransformTRS::identity(), eve::animation::AnimPose::local(), eve::animation::AnimPose::resize() , 以及 wrapTime().
被这些函数引用 eve::animation::AnimPlayer::play(), eve::animation::AnimPlayer::setTime() , 以及 eve::animation::AnimPlayer::update().
◆ setDuration()
| void eve::animation::AnimClip::setDuration | ( | float | seconds | ) |
在文件 AnimClip.cpp 第 18 行定义.
被这些函数引用 eve::animation::AnimImporter::importEva() , 以及 eve::animation::AnimImporter::loadClip().
◆ setLoop()
|
inline |
在文件 AnimClip.h 第 31 行定义.
◆ setName()
|
inline |
在文件 AnimClip.h 第 25 行定义.
引用了 name.
◆ setSampleRate()
| void eve::animation::AnimClip::setSampleRate | ( | float | hz | ) |
Sample rate hint used by MotionDatabase baking (Hz).
在文件 AnimClip.cpp 第 23 行定义.
◆ wrapTime()
| float eve::animation::AnimClip::wrapTime | ( | float | time | ) | const |
该类的文档由以下文件生成:
- src/modules/animation/AnimClip.h
- src/modules/animation/AnimClip.cpp