Animation module — tween factory + 2D sprite-sheet / Spine + 3D skeletal playback (player / state machine / motion matching) + control-theory procedural drivers + motion trails + per-frame pump. Script: anim <- eve.Animation();
更多...
#include <Animation.h>
Public 成员函数 | |
| Module_REG (Animation) | |
| Animation () | |
| Animation. | |
| ~Animation () override | |
| Animation. | |
| Animation (const Animation &)=delete | |
| Animation & | operator= (const Animation &)=delete |
| Tween * | newTween (float duration=1.f) |
| Create a tween (duration in seconds). Returned pointer is owned by script GC. | |
| SpriteSheet * | newSpriteSheet () |
| 2D sprite-sheet animation factories (script GC owns returned objects). | |
| SpriteSheet * | newSpriteSheetFromSequence (eve::graphics::Graphics *gfx, const std::string &pattern, int first, int last, int columns=0) |
Load numbered PNG files into a runtime atlas and return its frame table. Pattern must contain {n}, e.g. fx/frame ({n}).png. All frames must share dimensions and RGBA8 format. columns <= 0 chooses a near-square atlas. | |
| SpriteSheet * | newSpriteSheetFromAtlasJson (eve::graphics::Graphics *gfx, const std::string &texturePath, const std::string &jsonPath) |
| Import Aseprite/TexturePacker JSON frame metadata and its atlas texture. | |
| SpriteClip * | newSpriteClip (const std::string &name="") |
| Creates a sprite clip. @ownership Caller deletes unless documented otherwise. | |
| SpriteAnim * | newSpriteAnim () |
| Creates a sprite anim. @ownership Caller deletes unless documented otherwise. | |
| int | getSpriteSequenceCacheCount () const |
| Number of decoded runtime sequence atlases retained for reuse. | |
| int | getSpriteSequenceCacheBytes () const |
| Approximate RGBA8 bytes retained by cached sequence atlases. | |
| void | clearSpriteSequenceCache () |
| Drop cache metadata; existing returned sheets/textures remain valid. | |
| SpineAtlas * | newSpineAtlas () |
| Spine (region attachment subset) factories. | |
| SpineSkeletonData * | newSpineSkeletonData () |
| Creates a spine skeleton data. @ownership Caller deletes unless documented otherwise. | |
| SpineSkeleton * | newSpineSkeleton (SpineSkeletonData *data) |
| Creates a spine skeleton. @ownership Caller deletes unless documented otherwise. | |
| SpineAnim * | newSpineAnim (SpineSkeleton *skeleton) |
| Creates a spine anim. @ownership Caller deletes unless documented otherwise. | |
| SpineAtlas * | newSpineAtlasFromFile (const std::string &path) |
| Load helpers (allocate + parse; false → empty object still returned? prefer nullable). | |
| SpineAtlas * | newSpineAtlasFromText (const std::string &text) |
| Creates a spine atlas from text. @ownership Caller deletes unless documented otherwise. | |
| SpineSkeletonData * | newSpineSkeletonDataFromFile (const std::string &path) |
| Creates a spine skeleton data from file. @ownership Caller deletes unless documented otherwise. | |
| SpineSkeletonData * | newSpineSkeletonDataFromJson (const std::string &json) |
| Creates a spine skeleton data from json. @ownership Caller deletes unless documented otherwise. | |
| AnimSkeleton * | newSkeleton () |
| 3D skeletal animation factories (script GC owns returned objects). | |
| AnimClip * | newClip (const std::string &name="") |
| Creates a clip. @ownership Caller deletes unless documented otherwise. | |
| AnimPose * | newPose (int boneCount=0) |
| Creates a pose. @ownership Caller deletes unless documented otherwise. | |
| AnimBatch * | newBatch () |
| Create a parallel batch clip evaluator. | |
| AnimConstraintStack * | newConstraintStack (AnimSkeleton *skeleton) |
| Create an ordered procedural constraint stack. | |
| DynamicBoneSolver * | newDynamicBoneSolver (AnimSkeleton *skeleton) |
| Create a dynamic bone solver for spring-damped chains. @ownership Returned object is owned by script GC. @lifetime Valid until script GC releases it. | |
| int | setupHairChain (DynamicBoneSolver *solver, const std::string &rootBone, const std::string &tipBone, float stiffness=0.12f, float damping=0.18f, float inertia=0.8f, float endLength=0.08f, bool selfCollision=true) |
| Add a hair/tail spring chain with card-friendly defaults. | |
| int | setupHairHeadCollider (DynamicBoneSolver *solver, const std::string &boneName, float radius=0.12f) |
| Attach a head sphere collider for hair chains. | |
| FootIKSolver * | newFootIKSolver (AnimSkeleton *skeleton) |
| Create a paired-foot IK solver for a borrowed skeleton. @ownership Returned object is owned by script GC. @lifetime Valid until script GC releases it. | |
| AnimSyncGroup * | newSyncGroup () |
| Create a normalized-time player synchronization group. | |
| AnimPlayer * | newPlayer (AnimSkeleton *skeleton) |
| Creates a player. @ownership Caller deletes unless documented otherwise. | |
| AnimGraph * | newGraph (AnimSkeleton *skeleton) |
| Create a composable pose graph for the skeleton. | |
| AnimBoneMask * | newBoneMask (AnimSkeleton *skeleton) |
| Create a zero-weight per-bone animation mask. | |
| AnimLayerMixer * | newLayerMixer (AnimSkeleton *skeleton) |
| Create an override/additive animation layer mixer. | |
| AnimStateMachine * | newStateMachine (AnimSkeleton *skeleton) |
| Creates a state machine. @ownership Caller deletes unless documented otherwise. | |
| MotionDatabase * | newMotionDatabase (AnimSkeleton *skeleton) |
| Creates a motion database. @ownership Caller deletes unless documented otherwise. | |
| MotionMatcher * | newMotionMatcher (AnimSkeleton *skeleton, MotionDatabase *database) |
| Creates a motion matcher. @ownership Caller deletes unless documented otherwise. | |
| ControlAnim * | newControlAnim (float frequencyHz=3.f, float dampingZeta=1.f, float response=1.f) |
| Control-theory procedural animation (second-order / spring / PD). frequencyHz: natural frequency f (Hz); dampingZeta: ζ; response: r. | |
| ControlPose * | newControlPose (AnimSkeleton *skeleton) |
| Creates a control pose. @ownership Caller deletes unless documented otherwise. | |
| PhysicalBalancePose * | newPhysicalBalancePose (AnimSkeleton *skeleton) |
| Impulse-driven balance overlay that wobbles then recovers toward the authored pose. | |
| AnimSkeleton * | newSkeletonFromModel (eve::model3d::ModelData *model) |
| Import skeleton/clip from Assimp-backed ModelData. | |
| AnimClip * | newClipFromModel (eve::model3d::ModelData *model, AnimSkeleton *skeleton, int animIndex=0) |
| Creates a clip from model. @ownership Caller deletes unless documented otherwise. | |
| AnimSkeleton * | newSkeletonFromAnimationFixtureText (const std::string &path) |
Load a skeleton from an internal *.anim.txt test fixture. | |
| AnimClip * | newClipFromAnimationFixtureText (const std::string &path) |
Load an animation clip from an internal *.anim.txt test fixture. | |
| AnimSkin * | newSkinFromModel (eve::model3d::ModelData *model, int meshIndex, AnimSkeleton *skeleton) |
| CPU linear-blend skin binding for a skinned mesh on ModelData. meshIndex selects the Assimp mesh; bone names must match the skeleton. | |
| AnimLattice * | newLattice (int divX=2, int divY=2, int divZ=2) |
| 3D lattice scale-deformer (晶格缩放变形). divX/divY/divZ are the control-point divisions (each >= 2). Control points are driven with setPointScale / setPointOffset; bound vertices deform via trilinear interpolation (see AnimLattice). | |
| AnimLattice * | newLatticeFromModel (eve::model3d::ModelData *model, int meshIndex, int divX=2, int divY=2, int divZ=2) |
| newLattice bound to meshIndex of model (Assimp vertices). | |
| AnimTrail * | newTrail (int capacity=64) |
| Motion trail / afterimage (script GC owns returned object). capacity: max retained samples (>= 2). | |
| MotionBuilder | motion (float from, float to, float duration) |
| MotionVec2Builder | motionVec2 (MotionVec2 from, MotionVec2 to, float duration) |
| LitMotion-style Vec2 motion builder. | |
| MotionVec3Builder | motionVec3 (MotionVec3 from, MotionVec3 to, float duration) |
| LitMotion-style Vec3 motion builder. | |
| MotionBuilder | punch (float from, float strength, float duration) |
| MotionBuilder | shake (float from, float strength, float duration) |
| LitMotion-style shake (punch with deterministic random signs). | |
| MotionVec2Builder | punchVec2 (MotionVec2 from, MotionVec2 strength, float duration) |
| Vec2 punch builder. | |
| MotionVec2Builder | shakeVec2 (MotionVec2 from, MotionVec2 strength, float duration) |
| Vec2 shake builder. | |
| MotionVec3Builder | punchVec3 (MotionVec3 from, MotionVec3 strength, float duration) |
| Vec3 punch builder. | |
| MotionVec3Builder | shakeVec3 (MotionVec3 from, MotionVec3 strength, float duration) |
| Vec3 shake builder. | |
| MotionColorBuilder | motionColor (MotionColor from, MotionColor to, float duration) |
| Color tween builder (lerp). | |
| MotionQuatBuilder | motionQuat (MotionQuat from, MotionQuat to, float duration) |
| Quaternion tween builder (slerp). | |
| MotionSequence | sequence () |
| MotionRuntime & | motions () noexcept |
| Shared motion storage for builders and handle queries. | |
| const MotionRuntime & | motions () const noexcept |
| eve::Result< void > | advance (const eve::SimulationStep &step) |
| Advance all registered tweens, motions, sprite anims, and spine anims. | |
| eve::SimulationTick | currentTick () const noexcept |
| Last scheduler tick consumed by the checked module pump. | |
| void | update (float dt) |
| Legacy seconds facade; invalid input is explicitly consumed and ignored. | |
| int | getTweenCount () const |
| Returns the tween count. | |
| int | getMotionCount () const |
| Returns the motion count. | |
| void | ensureMotionCapacity (std::size_t floatCount) |
| Pre-size motion float pool for churn-free spawn (Phase 4). | |
| std::size_t | getMotionFloatCapacity () const noexcept |
| Returns the motion float capacity. | |
| std::size_t | getMotionFloatFreeCount () const noexcept |
| Returns the motion float free count. | |
| int | getSpriteAnimCount () const |
| Returns the sprite anim count. | |
| int | getSpineAnimCount () const |
| Returns the spine anim count. | |
| int | getActiveCount () const |
| Returns the active count. | |
| void | clearFinished () |
| Drop finished/stopped entries from the registry (does not delete Tween objects). | |
| void | clearAll () |
| Detach all tweens from the registry (does not delete Tween objects). | |
Public 成员函数 继承自 eve::Module | |
| virtual | ~Module () |
| Module. | |
| virtual std::string | getName () const =0 |
| Returns the name. | |
友元 | |
| class | Tween |
| class | SpriteAnim |
| class | SpineAnim |
详细描述
Animation module — tween factory + 2D sprite-sheet / Spine + 3D skeletal playback (player / state machine / motion matching) + control-theory procedural drivers + motion trails + per-frame pump. Script: anim <- eve.Animation();
Tweens / SpriteAnim / SpineAnim can be advanced via the scheduler-owned anim.advance(SimulationStep) API. The update(float) method remains a compatibility facade and explicitly consumes the checked Result. Relative property changes use Tween::setDelta / setDeltaAngle.
2D: SpriteSheet + SpriteClip + SpriteAnim; Spine region subset via SpineAtlas / SpineSkeletonData / SpineSkeleton / SpineAnim.
3D: build AnimSkeleton + AnimClip, then drive with AnimPlayer, AnimStateMachine, or MotionMatcher (+ MotionDatabase). Procedural: ControlAnim (scalar second-order/PD/spring) and ControlPose (pose tracking with the same control laws). Trails: AnimTrail records samples and draws fading trajectories.
在文件 Animation.h 第 80 行定义.
构造及析构函数说明
◆ Animation() [1/2]
|
default |
◆ ~Animation()
|
override |
◆ Animation() [2/2]
|
delete |
成员函数说明
◆ advance()
| eve::Result< void > eve::animation::Animation::advance | ( | const eve::SimulationStep & | step | ) |
Advance all registered tweens, motions, sprite anims, and spine anims.
在文件 Animation.cpp 第 506 行定义.
引用了 a, eve::animation::MotionRuntime::advance(), eve::Applied, eve::Conflict, eve::animation::MotionRuntime::currentTick(), eve::Diagnostic::error(), eve::Result< T >::failure(), eve::animation::MotionRuntime::hasCurrentTick(), eve::InvalidArgument, step, eve::Status::success(), eve::Result< T >::success() , 以及 t.
被这些函数引用 update().
◆ clearAll()
| void eve::animation::Animation::clearAll | ( | ) |
Detach all tweens from the registry (does not delete Tween objects).
在文件 Animation.cpp 第 619 行定义.
引用了 t.
◆ clearFinished()
| void eve::animation::Animation::clearFinished | ( | ) |
Drop finished/stopped entries from the registry (does not delete Tween objects).
在文件 Animation.cpp 第 606 行定义.
引用了 t.
◆ clearSpriteSequenceCache()
| void eve::animation::Animation::clearSpriteSequenceCache | ( | ) |
Drop cache metadata; existing returned sheets/textures remain valid.
在文件 Animation.cpp 第 226 行定义.
◆ currentTick()
|
inlinenoexcept |
Last scheduler tick consumed by the checked module pump.
在文件 Animation.h 第 323 行定义.
◆ ensureMotionCapacity()
|
inline |
Pre-size motion float pool for churn-free spawn (Phase 4).
- 参数
-
floatCount Target number of float slots (Inactive + free-list).
在文件 Animation.h 第 337 行定义.
◆ getActiveCount()
| int eve::animation::Animation::getActiveCount | ( | ) | const |
Returns the active count.
在文件 Animation.cpp 第 592 行定义.
引用了 a, eve::animation::MotionRuntime::activeCount(), n , 以及 t.
◆ getMotionCount()
|
inline |
Returns the motion count.
在文件 Animation.h 第 331 行定义.
◆ getMotionFloatCapacity()
|
inlinenoexcept |
Returns the motion float capacity.
在文件 Animation.h 第 339 行定义.
◆ getMotionFloatFreeCount()
|
inlinenoexcept |
Returns the motion float free count.
在文件 Animation.h 第 343 行定义.
◆ getSpineAnimCount()
|
inline |
Returns the spine anim count.
在文件 Animation.h 第 349 行定义.
◆ getSpriteAnimCount()
|
inline |
Returns the sprite anim count.
在文件 Animation.h 第 347 行定义.
◆ getSpriteSequenceCacheBytes()
| int eve::animation::Animation::getSpriteSequenceCacheBytes | ( | ) | const |
Approximate RGBA8 bytes retained by cached sequence atlases.
在文件 Animation.cpp 第 218 行定义.
引用了 bytes.
◆ getSpriteSequenceCacheCount()
| int eve::animation::Animation::getSpriteSequenceCacheCount | ( | ) | const |
Number of decoded runtime sequence atlases retained for reuse.
在文件 Animation.cpp 第 217 行定义.
◆ getTweenCount()
|
inline |
Returns the tween count.
在文件 Animation.h 第 329 行定义.
◆ Module_REG()
| eve::animation::Animation::Module_REG | ( | Animation | ) |
◆ motion()
| MotionBuilder eve::animation::Animation::motion | ( | float | from, |
| float | to, | ||
| float | duration | ||
| ) |
在文件 Animation.cpp 第 417 行定义.
◆ motionColor()
| MotionColorBuilder eve::animation::Animation::motionColor | ( | MotionColor | from, |
| MotionColor | to, | ||
| float | duration | ||
| ) |
◆ motionQuat()
| MotionQuatBuilder eve::animation::Animation::motionQuat | ( | MotionQuat | from, |
| MotionQuat | to, | ||
| float | duration | ||
| ) |
◆ motions() [1/2]
|
inlinenoexcept |
在文件 Animation.h 第 317 行定义.
◆ motions() [2/2]
|
inlinenoexcept |
Shared motion storage for builders and handle queries.
在文件 Animation.h 第 316 行定义.
◆ motionVec2()
| MotionVec2Builder eve::animation::Animation::motionVec2 | ( | MotionVec2 | from, |
| MotionVec2 | to, | ||
| float | duration | ||
| ) |
◆ motionVec3()
| MotionVec3Builder eve::animation::Animation::motionVec3 | ( | MotionVec3 | from, |
| MotionVec3 | to, | ||
| float | duration | ||
| ) |
◆ newBatch()
| AnimBatch * eve::animation::Animation::newBatch | ( | ) |
Create a parallel batch clip evaluator.
在文件 Animation.cpp 第 332 行定义.
◆ newBoneMask()
| AnimBoneMask * eve::animation::Animation::newBoneMask | ( | AnimSkeleton * | skeleton | ) |
Create a zero-weight per-bone animation mask.
在文件 Animation.cpp 第 368 行定义.
◆ newClip()
| AnimClip * eve::animation::Animation::newClip | ( | const std::string & | name = "" | ) |
Creates a clip. @ownership Caller deletes unless documented otherwise.
在文件 Animation.cpp 第 329 行定义.
引用了 name.
◆ newClipFromAnimationFixtureText()
| AnimClip * eve::animation::Animation::newClipFromAnimationFixtureText | ( | const std::string & | path | ) |
Load an animation clip from an internal *.anim.txt test fixture.
- 参数
-
path Filesystem path read synchronously during this call.
- 返回
- Newly allocated clip owned by the caller; never null on success. @ownership Owned; the caller must delete the returned clip. @lifetime Independent of this Animation module after construction; registered hot-reload tracking remains valid until the clip is destroyed.
- 异常
-
Exception when the fixture is missing, malformed, or unsupported. @thread Main-thread animation API; no internal synchronization. @reentrancy Does not invoke user callbacks while loading.
在文件 Animation.cpp 第 402 行定义.
引用了 clip, eve::animation::AnimImporter::importAnimationFixtureTextFile(), path , 以及 eve::animation::AnimClipRegistry::registerPath().
◆ newClipFromModel()
| AnimClip * eve::animation::Animation::newClipFromModel | ( | eve::model3d::ModelData * | model, |
| AnimSkeleton * | skeleton, | ||
| int | animIndex = 0 |
||
| ) |
Creates a clip from model. @ownership Caller deletes unless documented otherwise.
在文件 AnimationModelImport.cpp 第 17 行定义.
引用了 eve::animation::AnimImporter::loadClipFromModel() , 以及 model.
被这些函数引用 eve::animation::exposeAnimationModelImportBindings().
◆ newConstraintStack()
| AnimConstraintStack * eve::animation::Animation::newConstraintStack | ( | AnimSkeleton * | skeleton | ) |
Create an ordered procedural constraint stack.
在文件 Animation.cpp 第 333 行定义.
◆ newControlAnim()
| ControlAnim * eve::animation::Animation::newControlAnim | ( | float | frequencyHz = 3.f, |
| float | dampingZeta = 1.f, |
||
| float | response = 1.f |
||
| ) |
Control-theory procedural animation (second-order / spring / PD). frequencyHz: natural frequency f (Hz); dampingZeta: ζ; response: r.
在文件 Animation.cpp 第 384 行定义.
◆ newControlPose()
| ControlPose * eve::animation::Animation::newControlPose | ( | AnimSkeleton * | skeleton | ) |
Creates a control pose. @ownership Caller deletes unless documented otherwise.
在文件 Animation.cpp 第 388 行定义.
◆ newDynamicBoneSolver()
| DynamicBoneSolver * eve::animation::Animation::newDynamicBoneSolver | ( | AnimSkeleton * | skeleton | ) |
Create a dynamic bone solver for spring-damped chains. @ownership Returned object is owned by script GC. @lifetime Valid until script GC releases it.
在文件 Animation.cpp 第 336 行定义.
◆ newFootIKSolver()
| FootIKSolver * eve::animation::Animation::newFootIKSolver | ( | AnimSkeleton * | skeleton | ) |
Create a paired-foot IK solver for a borrowed skeleton. @ownership Returned object is owned by script GC. @lifetime Valid until script GC releases it.
在文件 Animation.cpp 第 362 行定义.
◆ newGraph()
| AnimGraph * eve::animation::Animation::newGraph | ( | AnimSkeleton * | skeleton | ) |
Create a composable pose graph for the skeleton.
在文件 Animation.cpp 第 366 行定义.
◆ newLattice()
| AnimLattice * eve::animation::Animation::newLattice | ( | int | divX = 2, |
| int | divY = 2, |
||
| int | divZ = 2 |
||
| ) |
3D lattice scale-deformer (晶格缩放变形). divX/divY/divZ are the control-point divisions (each >= 2). Control points are driven with setPointScale / setPointOffset; bound vertices deform via trilinear interpolation (see AnimLattice).
在文件 Animation.cpp 第 411 行定义.
◆ newLatticeFromModel()
| AnimLattice * eve::animation::Animation::newLatticeFromModel | ( | eve::model3d::ModelData * | model, |
| int | meshIndex, | ||
| int | divX = 2, |
||
| int | divY = 2, |
||
| int | divZ = 2 |
||
| ) |
newLattice bound to meshIndex of model (Assimp vertices).
在文件 AnimationModelImport.cpp 第 27 行定义.
引用了 eve::animation::AnimLattice::fromModel() , 以及 model.
被这些函数引用 eve::animation::exposeAnimationModelImportBindings().
◆ newLayerMixer()
| AnimLayerMixer * eve::animation::Animation::newLayerMixer | ( | AnimSkeleton * | skeleton | ) |
Create an override/additive animation layer mixer.
在文件 Animation.cpp 第 370 行定义.
◆ newMotionDatabase()
| MotionDatabase * eve::animation::Animation::newMotionDatabase | ( | AnimSkeleton * | skeleton | ) |
Creates a motion database. @ownership Caller deletes unless documented otherwise.
在文件 Animation.cpp 第 376 行定义.
◆ newMotionMatcher()
| MotionMatcher * eve::animation::Animation::newMotionMatcher | ( | AnimSkeleton * | skeleton, |
| MotionDatabase * | database | ||
| ) |
Creates a motion matcher. @ownership Caller deletes unless documented otherwise.
在文件 Animation.cpp 第 380 行定义.
◆ newPhysicalBalancePose()
| PhysicalBalancePose * eve::animation::Animation::newPhysicalBalancePose | ( | AnimSkeleton * | skeleton | ) |
Impulse-driven balance overlay that wobbles then recovers toward the authored pose.
- 参数
-
skeleton Borrowed hierarchy; must outlive the returned object.
- 返回
- Newly allocated overlay owned by the caller; never null. @ownership Owned; the caller (or script GC) deletes the object. @lifetime Independent of this Animation module after construction.
- 异常
-
eve::Exception when skeleton is null. @thread Owner thread only; no callbacks.
在文件 Animation.cpp 第 390 行定义.
◆ newPlayer()
| AnimPlayer * eve::animation::Animation::newPlayer | ( | AnimSkeleton * | skeleton | ) |
Creates a player. @ownership Caller deletes unless documented otherwise.
在文件 Animation.cpp 第 365 行定义.
◆ newPose()
| AnimPose * eve::animation::Animation::newPose | ( | int | boneCount = 0 | ) |
Creates a pose. @ownership Caller deletes unless documented otherwise.
在文件 Animation.cpp 第 331 行定义.
◆ newSkeleton()
| AnimSkeleton * eve::animation::Animation::newSkeleton | ( | ) |
3D skeletal animation factories (script GC owns returned objects).
在文件 Animation.cpp 第 327 行定义.
◆ newSkeletonFromAnimationFixtureText()
| AnimSkeleton * eve::animation::Animation::newSkeletonFromAnimationFixtureText | ( | const std::string & | path | ) |
Load a skeleton from an internal *.anim.txt test fixture.
- 参数
-
path Filesystem path read synchronously during this call.
- 返回
- Newly allocated skeleton owned by the caller; never null on success. @ownership Owned; the caller must delete the returned skeleton. @lifetime Independent of this Animation module after construction.
- 异常
-
Exception when the fixture is missing, malformed, or unsupported. @thread Main-thread animation API; no internal synchronization. @reentrancy Does not invoke user callbacks.
在文件 Animation.cpp 第 394 行定义.
引用了 clip, eve::animation::AnimImporter::importAnimationFixtureTextFile() , 以及 path.
◆ newSkeletonFromModel()
| AnimSkeleton * eve::animation::Animation::newSkeletonFromModel | ( | eve::model3d::ModelData * | model | ) |
Import skeleton/clip from Assimp-backed ModelData.
- 备注
- Linked only when
OPTIONAL_DEPS model3dis enabled (AnimationModelImport.cpp). Prefer fixture text helpers when model3d is trimmed.
在文件 AnimationModelImport.cpp 第 13 行定义.
引用了 eve::animation::AnimImporter::loadSkeletonFromModel() , 以及 model.
被这些函数引用 eve::animation::exposeAnimationModelImportBindings().
◆ newSkinFromModel()
| AnimSkin * eve::animation::Animation::newSkinFromModel | ( | eve::model3d::ModelData * | model, |
| int | meshIndex, | ||
| AnimSkeleton * | skeleton | ||
| ) |
CPU linear-blend skin binding for a skinned mesh on ModelData. meshIndex selects the Assimp mesh; bone names must match the skeleton.
在文件 AnimationModelImport.cpp 第 22 行定义.
引用了 eve::animation::AnimSkin::fromModel() , 以及 model.
被这些函数引用 eve::animation::exposeAnimationModelImportBindings().
◆ newSpineAnim()
| SpineAnim * eve::animation::Animation::newSpineAnim | ( | SpineSkeleton * | skeleton | ) |
Creates a spine anim. @ownership Caller deletes unless documented otherwise.
在文件 Animation.cpp 第 281 行定义.
◆ newSpineAtlas()
| SpineAtlas * eve::animation::Animation::newSpineAtlas | ( | ) |
Spine (region attachment subset) factories.
在文件 Animation.cpp 第 273 行定义.
◆ newSpineAtlasFromFile()
| SpineAtlas * eve::animation::Animation::newSpineAtlasFromFile | ( | const std::string & | path | ) |
Load helpers (allocate + parse; false → empty object still returned? prefer nullable).
在文件 Animation.cpp 第 287 行定义.
引用了 path.
◆ newSpineAtlasFromText()
| SpineAtlas * eve::animation::Animation::newSpineAtlasFromText | ( | const std::string & | text | ) |
Creates a spine atlas from text. @ownership Caller deletes unless documented otherwise.
在文件 Animation.cpp 第 297 行定义.
引用了 text.
◆ newSpineSkeleton()
| SpineSkeleton * eve::animation::Animation::newSpineSkeleton | ( | SpineSkeletonData * | data | ) |
Creates a spine skeleton. @ownership Caller deletes unless documented otherwise.
在文件 Animation.cpp 第 277 行定义.
◆ newSpineSkeletonData()
| SpineSkeletonData * eve::animation::Animation::newSpineSkeletonData | ( | ) |
Creates a spine skeleton data. @ownership Caller deletes unless documented otherwise.
在文件 Animation.cpp 第 275 行定义.
◆ newSpineSkeletonDataFromFile()
| SpineSkeletonData * eve::animation::Animation::newSpineSkeletonDataFromFile | ( | const std::string & | path | ) |
Creates a spine skeleton data from file. @ownership Caller deletes unless documented otherwise.
在文件 Animation.cpp 第 307 行定义.
引用了 path.
◆ newSpineSkeletonDataFromJson()
| SpineSkeletonData * eve::animation::Animation::newSpineSkeletonDataFromJson | ( | const std::string & | json | ) |
Creates a spine skeleton data from json. @ownership Caller deletes unless documented otherwise.
在文件 Animation.cpp 第 317 行定义.
◆ newSpriteAnim()
| SpriteAnim * eve::animation::Animation::newSpriteAnim | ( | ) |
Creates a sprite anim. @ownership Caller deletes unless documented otherwise.
在文件 Animation.cpp 第 267 行定义.
引用了 a , 以及 SpriteAnim.
◆ newSpriteClip()
| SpriteClip * eve::animation::Animation::newSpriteClip | ( | const std::string & | name = "" | ) |
Creates a sprite clip. @ownership Caller deletes unless documented otherwise.
在文件 Animation.cpp 第 265 行定义.
引用了 name.
◆ newSpriteSheet()
| SpriteSheet * eve::animation::Animation::newSpriteSheet | ( | ) |
2D sprite-sheet animation factories (script GC owns returned objects).
在文件 Animation.cpp 第 122 行定义.
◆ newSpriteSheetFromAtlasJson()
| SpriteSheet * eve::animation::Animation::newSpriteSheetFromAtlasJson | ( | eve::graphics::Graphics * | gfx, |
| const std::string & | texturePath, | ||
| const std::string & | jsonPath | ||
| ) |
◆ newSpriteSheetFromSequence()
| SpriteSheet * eve::animation::Animation::newSpriteSheetFromSequence | ( | eve::graphics::Graphics * | gfx, |
| const std::string & | pattern, | ||
| int | first, | ||
| int | last, | ||
| int | columns = 0 |
||
| ) |
Load numbered PNG files into a runtime atlas and return its frame table. Pattern must contain {n}, e.g. fx/frame ({n}).png. All frames must share dimensions and RGBA8 format. columns <= 0 chooses a near-square atlas.
在文件 Animation.cpp 第 124 行定义.
引用了 b, bounds, columns, count, first, eve::image::ImageData::getFormat(), eve::image::ImageData::getHeight(), eve::image::ImageData::getPixel(), eve::image::ImageData::getWidth(), h, n, eve::image::Image::newImageData(), eve::image::Image::newImageDataFromFile(), eve::graphics::Graphics::newTextureFromImageData(), eve::image::ImageData::paste(), path, pattern, px, py, rows, w, x , 以及 y.
◆ newStateMachine()
| AnimStateMachine * eve::animation::Animation::newStateMachine | ( | AnimSkeleton * | skeleton | ) |
Creates a state machine. @ownership Caller deletes unless documented otherwise.
在文件 Animation.cpp 第 372 行定义.
◆ newSyncGroup()
| AnimSyncGroup * eve::animation::Animation::newSyncGroup | ( | ) |
Create a normalized-time player synchronization group.
在文件 Animation.cpp 第 363 行定义.
◆ newTrail()
| AnimTrail * eve::animation::Animation::newTrail | ( | int | capacity = 64 | ) |
Motion trail / afterimage (script GC owns returned object). capacity: max retained samples (>= 2).
在文件 Animation.cpp 第 415 行定义.
引用了 capacity.
◆ newTween()
Create a tween (duration in seconds). Returned pointer is owned by script GC.
在文件 Animation.cpp 第 116 行定义.
◆ operator=()
◆ punch()
| MotionBuilder eve::animation::Animation::punch | ( | float | from, |
| float | strength, | ||
| float | duration | ||
| ) |
在文件 Animation.cpp 第 431 行定义.
引用了 duration, from, eve::animation::Punch, strength , 以及 eve::animation::MotionBuilder::style().
◆ punchVec2()
| MotionVec2Builder eve::animation::Animation::punchVec2 | ( | MotionVec2 | from, |
| MotionVec2 | strength, | ||
| float | duration | ||
| ) |
Vec2 punch builder.
在文件 Animation.cpp 第 439 行定义.
引用了 duration, from, eve::animation::Punch, strength , 以及 eve::animation::MotionVec2Builder::style().
◆ punchVec3()
| MotionVec3Builder eve::animation::Animation::punchVec3 | ( | MotionVec3 | from, |
| MotionVec3 | strength, | ||
| float | duration | ||
| ) |
Vec3 punch builder.
在文件 Animation.cpp 第 447 行定义.
引用了 duration, from, eve::animation::Punch, strength , 以及 eve::animation::MotionVec3Builder::style().
◆ sequence()
| MotionSequence eve::animation::Animation::sequence | ( | ) |
在文件 Animation.cpp 第 429 行定义.
◆ setupHairChain()
| int eve::animation::Animation::setupHairChain | ( | DynamicBoneSolver * | solver, |
| const std::string & | rootBone, | ||
| const std::string & | tipBone, | ||
| float | stiffness = 0.12f, |
||
| float | damping = 0.18f, |
||
| float | inertia = 0.8f, |
||
| float | endLength = 0.08f, |
||
| bool | selfCollision = true |
||
| ) |
Add a hair/tail spring chain with card-friendly defaults.
- 返回
- Chain index, or -1 on failure.
在文件 Animation.cpp 第 340 行定义.
引用了 eve::animation::hair::addChain(), desc, inertia , 以及 eve::animation::hair::ChainDesc::rootBone.
◆ setupHairHeadCollider()
| int eve::animation::Animation::setupHairHeadCollider | ( | DynamicBoneSolver * | solver, |
| const std::string & | boneName, | ||
| float | radius = 0.12f |
||
| ) |
Attach a head sphere collider for hair chains.
- 返回
- Collider count after add, or -1 on failure.
在文件 Animation.cpp 第 356 行定义.
◆ shake()
| MotionBuilder eve::animation::Animation::shake | ( | float | from, |
| float | strength, | ||
| float | duration | ||
| ) |
LitMotion-style shake (punch with deterministic random signs).
在文件 Animation.cpp 第 435 行定义.
引用了 duration, from, eve::animation::Shake, strength , 以及 eve::animation::MotionBuilder::style().
◆ shakeVec2()
| MotionVec2Builder eve::animation::Animation::shakeVec2 | ( | MotionVec2 | from, |
| MotionVec2 | strength, | ||
| float | duration | ||
| ) |
Vec2 shake builder.
在文件 Animation.cpp 第 443 行定义.
引用了 duration, from, eve::animation::Shake, strength , 以及 eve::animation::MotionVec2Builder::style().
◆ shakeVec3()
| MotionVec3Builder eve::animation::Animation::shakeVec3 | ( | MotionVec3 | from, |
| MotionVec3 | strength, | ||
| float | duration | ||
| ) |
Vec3 shake builder.
在文件 Animation.cpp 第 451 行定义.
引用了 duration, from, eve::animation::Shake, strength , 以及 eve::animation::MotionVec3Builder::style().
◆ update()
| void eve::animation::Animation::update | ( | float | dt | ) |
Legacy seconds facade; invalid input is explicitly consumed and ignored.
在文件 Animation.cpp 第 575 行定义.
引用了 advance(), duration, eve::Diagnostic::error(), EV_PROFILE_MODULE, eve::Result< T >::failure(), eve::Duration::fromSeconds(), eve::Result< T >::ignore(), eve::detail::StrongUint64< Tag >::incremented() , 以及 eve::InvariantViolation.
友元及相关函数文档
◆ SpineAnim
|
friend |
在文件 Animation.h 第 362 行定义.
被这些函数引用 newSpineAnim().
◆ SpriteAnim
|
friend |
在文件 Animation.h 第 361 行定义.
被这些函数引用 newSpriteAnim().
◆ Tween
|
friend |
在文件 Animation.h 第 360 行定义.
被这些函数引用 newTween().
该类的文档由以下文件生成:
- src/modules/animation/Animation.h
- src/modules/animation/Animation.cpp
- src/modules/animation/AnimationModelImport.cpp
Public 成员函数 继承自