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

Property tween — interpolates named float properties from → to over time. 更多...

#include <Tween.h>

Public 成员函数

 Tween (float duration=1.f)
 
 ~Tween ()
 
 Tween (const Tween &)=delete
 
Tweenoperator= (const Tween &)=delete
 
void setFrom (const std::string &name, float value)
 
void setTo (const std::string &name, float value)
 
void setDelta (const std::string &name, float delta)
 Relative change: end = start + delta (resolved when start() runs).
 
void setFromAngle (const std::string &name, float radians)
 
void setToAngle (const std::string &name, float radians)
 
void setDeltaAngle (const std::string &name, float deltaRadians)
 
bool has (const std::string &name) const
 
float get (const std::string &name) const
 
float getFrom (const std::string &name) const
 
float getTo (const std::string &name) const
 
float getDelta (const std::string &name) const
 
void setDuration (float seconds)
 
float getDuration () const
 
void setDelay (float seconds)
 
float getDelay () const
 
void setEase (const std::string &kind)
 
std::string getEase () const
 
void setRepeat (int count)
 Play count: 1 = once (default), N = N cycles, -1 = infinite. Values < -1 are clamped to -1.
 
int getRepeat () const
 
void setYoyo (bool enabled)
 
bool getYoyo () const
 
void start ()
 
void pause ()
 
void resume ()
 
void stop ()
 
void reset ()
 
bool isRunning () const
 
bool isPaused () const
 
bool isFinished () const
 
bool isStopped () const
 
bool isDelayed () const
 
bool isActive () const
 
float getElapsed () const
 Elapsed time in the current cycle (excludes delay).
 
float getProgress () const
 Linear progress in the current cycle, [0,1].
 
float getEasedProgress () const
 Eased progress used for interpolation, [0,1].
 
bool update (float dt)
 Advance by dt seconds. Returns true while the tween is still active (delayed / running / paused).
 
float evaluate (const std::string &name, float t) const
 Sample property at linear t in [0,1] using current from/to (no state change).
 
int getPropertyCount () const
 Names of all property tracks (stable order = insertion order).
 
std::string getPropertyName (int index) const
 

友元

class Animation
 

详细描述

Property tween — interpolates named float properties from → to over time.

Absolute end: setFrom + setTo. Relative delta (“变动差值”): setFrom + setDelta (to = from + delta at start), or setDelta alone (from defaults to current/0). Angle tracks use shortest-path lerp (setToAngle / setDeltaAngle).

No API overloads; ease kind is a string (same set as Math.ease).

在文件 Tween.h21 行定义.

构造及析构函数说明

◆ Tween() [1/2]

eve::animation::Tween::Tween ( float  duration = 1.f)
explicit

在文件 Tween.cpp15 行定义.

引用了 setDuration().

◆ ~Tween()

eve::animation::Tween::~Tween ( )

在文件 Tween.cpp17 行定义.

◆ Tween() [2/2]

eve::animation::Tween::Tween ( const Tween )
delete

成员函数说明

◆ evaluate()

float eve::animation::Tween::evaluate ( const std::string &  name,
float  t 
) const

Sample property at linear t in [0,1] using current from/to (no state change).

在文件 Tween.cpp293 行定义.

引用了 name , 以及 tr.

◆ get()

float eve::animation::Tween::get ( const std::string &  name) const

在文件 Tween.cpp84 行定义.

引用了 name , 以及 tr.

◆ getDelay()

float eve::animation::Tween::getDelay ( ) const
inline

在文件 Tween.h47 行定义.

◆ getDelta()

float eve::animation::Tween::getDelta ( const std::string &  name) const

在文件 Tween.cpp103 行定义.

引用了 name , 以及 tr.

◆ getDuration()

float eve::animation::Tween::getDuration ( ) const
inline

在文件 Tween.h45 行定义.

◆ getEase()

std::string eve::animation::Tween::getEase ( ) const
inline

在文件 Tween.h49 行定义.

◆ getEasedProgress()

float eve::animation::Tween::getEasedProgress ( ) const

Eased progress used for interpolation, [0,1].

在文件 Tween.cpp196 行定义.

引用了 getProgress().

◆ getElapsed()

float eve::animation::Tween::getElapsed ( ) const
inline

Elapsed time in the current cycle (excludes delay).

在文件 Tween.h76 行定义.

◆ getFrom()

float eve::animation::Tween::getFrom ( const std::string &  name) const

在文件 Tween.cpp90 行定义.

引用了 name , 以及 tr.

◆ getProgress()

float eve::animation::Tween::getProgress ( ) const

Linear progress in the current cycle, [0,1].

在文件 Tween.cpp191 行定义.

被这些函数引用 getEasedProgress() , 以及 update().

◆ getPropertyCount()

int eve::animation::Tween::getPropertyCount ( ) const
inline

Names of all property tracks (stable order = insertion order).

在文件 Tween.h92 行定义.

◆ getPropertyName()

std::string eve::animation::Tween::getPropertyName ( int  index) const

在文件 Tween.cpp306 行定义.

◆ getRepeat()

int eve::animation::Tween::getRepeat ( ) const
inline

在文件 Tween.h56 行定义.

◆ getTo()

float eve::animation::Tween::getTo ( const std::string &  name) const

在文件 Tween.cpp96 行定义.

引用了 name , 以及 tr.

◆ getYoyo()

bool eve::animation::Tween::getYoyo ( ) const
inline

在文件 Tween.h58 行定义.

◆ has()

bool eve::animation::Tween::has ( const std::string &  name) const

在文件 Tween.cpp82 行定义.

引用了 name.

◆ isActive()

bool eve::animation::Tween::isActive ( ) const
inline

在文件 Tween.h71 行定义.

被这些函数引用 update().

◆ isDelayed()

bool eve::animation::Tween::isDelayed ( ) const
inline

在文件 Tween.h70 行定义.

◆ isFinished()

bool eve::animation::Tween::isFinished ( ) const
inline

在文件 Tween.h68 行定义.

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

◆ isPaused()

bool eve::animation::Tween::isPaused ( ) const
inline

在文件 Tween.h67 行定义.

◆ isRunning()

bool eve::animation::Tween::isRunning ( ) const
inline

在文件 Tween.h66 行定义.

◆ isStopped()

bool eve::animation::Tween::isStopped ( ) const
inline

在文件 Tween.h69 行定义.

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

◆ operator=()

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

◆ pause()

void eve::animation::Tween::pause ( )

在文件 Tween.cpp212 行定义.

◆ reset()

void eve::animation::Tween::reset ( )

在文件 Tween.cpp229 行定义.

引用了 tr.

◆ resume()

void eve::animation::Tween::resume ( )

在文件 Tween.cpp216 行定义.

◆ setDelay()

void eve::animation::Tween::setDelay ( float  seconds)

在文件 Tween.cpp115 行定义.

◆ setDelta()

void eve::animation::Tween::setDelta ( const std::string &  name,
float  delta 
)

Relative change: end = start + delta (resolved when start() runs).

在文件 Tween.cpp50 行定义.

引用了 name , 以及 tr.

◆ setDeltaAngle()

void eve::animation::Tween::setDeltaAngle ( const std::string &  name,
float  deltaRadians 
)

在文件 Tween.cpp74 行定义.

引用了 name , 以及 tr.

◆ setDuration()

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

在文件 Tween.cpp110 行定义.

被这些函数引用 Tween().

◆ setEase()

void eve::animation::Tween::setEase ( const std::string &  kind)

在文件 Tween.cpp120 行定义.

引用了 kind.

◆ setFrom()

void eve::animation::Tween::setFrom ( const std::string &  name,
float  value 
)

在文件 Tween.cpp34 行定义.

引用了 name, tr , 以及 value.

◆ setFromAngle()

void eve::animation::Tween::setFromAngle ( const std::string &  name,
float  radians 
)

在文件 Tween.cpp58 行定义.

引用了 name , 以及 tr.

◆ setRepeat()

void eve::animation::Tween::setRepeat ( int  count)

Play count: 1 = once (default), N = N cycles, -1 = infinite. Values < -1 are clamped to -1.

在文件 Tween.cpp126 行定义.

◆ setTo()

void eve::animation::Tween::setTo ( const std::string &  name,
float  value 
)

在文件 Tween.cpp42 行定义.

引用了 name, tr , 以及 value.

◆ setToAngle()

void eve::animation::Tween::setToAngle ( const std::string &  name,
float  radians 
)

在文件 Tween.cpp66 行定义.

引用了 name , 以及 tr.

◆ setYoyo()

void eve::animation::Tween::setYoyo ( bool  enabled)
inline

在文件 Tween.h57 行定义.

引用了 enabled.

◆ start()

void eve::animation::Tween::start ( )

在文件 Tween.cpp202 行定义.

◆ stop()

void eve::animation::Tween::stop ( )

在文件 Tween.cpp224 行定义.

◆ update()

bool eve::animation::Tween::update ( float  dt)

Advance by dt seconds. Returns true while the tween is still active (delayed / running / paused).

在文件 Tween.cpp259 行定义.

引用了 getProgress() , 以及 isActive().

友元及相关函数文档

◆ Animation

friend class Animation
friend

在文件 Tween.h96 行定义.


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