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

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>

类 eve::animation::Animation 继承关系图:
eve::Module

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]

eve::animation::Animation::Animation ( )
default

◆ ~Animation()

eve::animation::Animation::~Animation ( )
override

Animation.

在文件 Animation.cpp 第 100 行定义.

引用了 a , 以及 t.

◆ Animation() [2/2]

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

成员函数说明

◆ advance()

eve::Result< void > eve::animation::Animation::advance ( const eve::SimulationStep &  step)

◆ 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()

eve::SimulationTick eve::animation::Animation::currentTick ( ) const
inlinenoexcept

Last scheduler tick consumed by the checked module pump.

在文件 Animation.h 第 323 行定义.

◆ ensureMotionCapacity()

void eve::animation::Animation::ensureMotionCapacity ( std::size_t  floatCount)
inline

Pre-size motion float pool for churn-free spawn (Phase 4).

参数
floatCountTarget number of float slots (Inactive + free-list).

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

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

◆ getActiveCount()

int eve::animation::Animation::getActiveCount ( ) const

Returns the active count.

在文件 Animation.cpp 第 592 行定义.

引用了 a, eve::animation::MotionRuntime::activeCount(), n , 以及 t.

◆ getMotionCount()

int eve::animation::Animation::getMotionCount ( ) const
inline

Returns the motion count.

在文件 Animation.h 第 331 行定义.

◆ getMotionFloatCapacity()

std::size_t eve::animation::Animation::getMotionFloatCapacity ( ) const
inlinenoexcept

Returns the motion float capacity.

在文件 Animation.h 第 339 行定义.

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

◆ getMotionFloatFreeCount()

std::size_t eve::animation::Animation::getMotionFloatFreeCount ( ) const
inlinenoexcept

Returns the motion float free count.

在文件 Animation.h 第 343 行定义.

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

◆ getSpineAnimCount()

int eve::animation::Animation::getSpineAnimCount ( ) const
inline

Returns the spine anim count.

在文件 Animation.h 第 349 行定义.

◆ getSpriteAnimCount()

int eve::animation::Animation::getSpriteAnimCount ( ) const
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()

int eve::animation::Animation::getTweenCount ( ) const
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 行定义.

引用了 duration, from , 以及 to.

◆ motionColor()

MotionColorBuilder eve::animation::Animation::motionColor ( MotionColor  from,
MotionColor  to,
float  duration 
)

Color tween builder (lerp).

在文件 Animation.cpp 第 455 行定义.

引用了 duration, from , 以及 to.

◆ motionQuat()

MotionQuatBuilder eve::animation::Animation::motionQuat ( MotionQuat  from,
MotionQuat  to,
float  duration 
)

Quaternion tween builder (slerp).

在文件 Animation.cpp 第 459 行定义.

引用了 duration, from , 以及 to.

◆ motions() [1/2]

const MotionRuntime & eve::animation::Animation::motions ( ) const
inlinenoexcept

在文件 Animation.h 第 317 行定义.

◆ motions() [2/2]

MotionRuntime & eve::animation::Animation::motions ( )
inlinenoexcept

Shared motion storage for builders and handle queries.

在文件 Animation.h 第 316 行定义.

◆ motionVec2()

MotionVec2Builder eve::animation::Animation::motionVec2 ( MotionVec2  from,
MotionVec2  to,
float  duration 
)

LitMotion-style Vec2 motion builder.

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

引用了 duration, from , 以及 to.

◆ motionVec3()

MotionVec3Builder eve::animation::Animation::motionVec3 ( MotionVec3  from,
MotionVec3  to,
float  duration 
)

LitMotion-style Vec3 motion builder.

在文件 Animation.cpp 第 425 行定义.

引用了 duration, from , 以及 to.

◆ 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.

参数
pathFilesystem 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.
异常
Exceptionwhen 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.

参数
skeletonBorrowed 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::Exceptionwhen 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.

参数
pathFilesystem 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.
异常
Exceptionwhen 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 model3d is 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 行定义.

引用了 a , 以及 SpineAnim.

◆ 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 
)

Import Aseprite/TexturePacker JSON frame metadata and its atlas texture.

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

引用了 error, file, h, name, eve::graphics::Graphics::newTextureFromFile(), root, size, text , 以及 w.

◆ 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()

Tween * eve::animation::Animation::newTween ( float  duration = 1.f)

Create a tween (duration in seconds). Returned pointer is owned by script GC.

在文件 Animation.cpp 第 116 行定义.

引用了 duration, t , 以及 Tween.

◆ operator=()

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

◆ punch()

MotionBuilder eve::animation::Animation::punch ( float  from,
float  strength,
float  duration 
)

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

引用了 eve::animation::hair::addHeadCollider() , 以及 radius.

◆ 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)

友元及相关函数文档

◆ SpineAnim

friend class SpineAnim
friend

在文件 Animation.h 第 362 行定义.

被这些函数引用 newSpineAnim().

◆ SpriteAnim

friend class SpriteAnim
friend

在文件 Animation.h 第 361 行定义.

被这些函数引用 newSpriteAnim().

◆ Tween

friend class Tween
friend

在文件 Animation.h 第 360 行定义.

被这些函数引用 newTween().


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