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

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

#include <Tween.h>

Public 成员函数

 Tween (float duration=1.f)
 Tween.
 
 ~Tween ()
 Tween.
 
 Tween (const Tween &)=delete
 
Tween & operator= (const Tween &)=delete
 
void setFrom (const std::string &name, float value)
 Sets the from.
 
void setTo (const std::string &name, float value)
 Sets the to.
 
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)
 Sets the from angle.
 
void setToAngle (const std::string &name, float radians)
 Sets the to angle.
 
void setDeltaAngle (const std::string &name, float deltaRadians)
 Sets the delta angle.
 
bool has (const std::string &name) const
 True when active.
 
float get (const std::string &name) const
 Returns the value.
 
float getFrom (const std::string &name) const
 Returns the from.
 
float getTo (const std::string &name) const
 Returns the to.
 
float getDelta (const std::string &name) const
 Returns the delta.
 
void setDuration (float seconds)
 Sets the duration.
 
float getDuration () const
 Returns the duration.
 
void setDelay (float seconds)
 Sets the delay.
 
float getDelay () const
 Returns the delay.
 
void setEase (const std::string &kind)
 Sets the ease.
 
std::string getEase () const
 Returns the ease.
 
void setRepeat (int count)
 Play count: 1 = once (default), N = N cycles, -1 = infinite. Values < -1 are clamped to -1.
 
int getRepeat () const
 Returns the repeat.
 
void setYoyo (bool enabled)
 Sets the yoyo.
 
bool getYoyo () const
 Returns the yoyo.
 
void start ()
 Starts .
 
void pause ()
 Pause.
 
void resume ()
 Resume.
 
void stop ()
 Stops .
 
void reset ()
 Resets .
 
bool isRunning () const
 True when running.
 
bool isPaused () const
 True when paused.
 
bool isFinished () const
 True when finished.
 
bool isStopped () const
 True when stopped.
 
bool isDelayed () const
 True when delayed.
 
bool isActive () const
 True when active.
 
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].
 
eve::Result< void > advance (const eve::SimulationStep &step)
 Advance by one scheduler-owned deterministic step.
 
bool hasCurrentTick () const noexcept
 Whether this tween has consumed a scheduler step.
 
eve::SimulationTick currentTick () const noexcept
 Last scheduler tick consumed by this tween.
 
bool update (float dt)
 Advance by dt seconds; legacy facade that forwards to advance().
 
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
 Returns the property name.
 

友元

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.h 第 25 行定义.

构造及析构函数说明

◆ Tween() [1/2]

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

Tween.

在文件 Tween.cpp 第 17 行定义.

引用了 duration , 以及 setDuration().

◆ ~Tween()

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

Tween.

在文件 Tween.cpp 第 19 行定义.

◆ Tween() [2/2]

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

成员函数说明

◆ advance()

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

Advance by one scheduler-owned deterministic step.

在文件 Tween.cpp 第 295 行定义.

引用了 eve::Applied, eve::Result< T >::failure(), eve::animation::detail::secondsForStep(), step, eve::Status::success() , 以及 eve::Result< T >::success().

被这些函数引用 update().

◆ currentTick()

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

Last scheduler tick consumed by this tween.

在文件 Tween.h 第 123 行定义.

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

引用了 from, name, t, to , 以及 tr.

◆ get()

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

Returns the value.

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

引用了 name , 以及 tr.

◆ getDelay()

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

Returns the delay.

在文件 Tween.h 第 67 行定义.

◆ getDelta()

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

Returns the delta.

在文件 Tween.cpp 第 105 行定义.

引用了 name , 以及 tr.

◆ getDuration()

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

Returns the duration.

在文件 Tween.h 第 63 行定义.

◆ getEase()

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

Returns the ease.

在文件 Tween.h 第 71 行定义.

◆ getEasedProgress()

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

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

在文件 Tween.cpp 第 198 行定义.

引用了 getProgress() , 以及 t.

◆ getElapsed()

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

Elapsed time in the current cycle (excludes delay).

在文件 Tween.h 第 112 行定义.

◆ getFrom()

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

Returns the from.

在文件 Tween.cpp 第 92 行定义.

引用了 name , 以及 tr.

◆ getProgress()

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

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

在文件 Tween.cpp 第 193 行定义.

被这些函数引用 getEasedProgress().

◆ getPropertyCount()

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

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

在文件 Tween.h 第 131 行定义.

◆ getPropertyName()

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

Returns the property name.

在文件 Tween.cpp 第 328 行定义.

引用了 index.

◆ getRepeat()

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

Returns the repeat.

在文件 Tween.h 第 79 行定义.

◆ getTo()

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

Returns the to.

在文件 Tween.cpp 第 98 行定义.

引用了 name , 以及 tr.

◆ getYoyo()

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

Returns the yoyo.

在文件 Tween.h 第 83 行定义.

◆ has()

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

True when active.

在文件 Tween.cpp 第 84 行定义.

引用了 name.

◆ hasCurrentTick()

bool eve::animation::Tween::hasCurrentTick ( ) const
inlinenoexcept

Whether this tween has consumed a scheduler step.

在文件 Tween.h 第 121 行定义.

◆ isActive()

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

True when active.

在文件 Tween.h 第 107 行定义.

被这些函数引用 update().

◆ isDelayed()

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

True when delayed.

在文件 Tween.h 第 105 行定义.

◆ isFinished()

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

True when finished.

在文件 Tween.h 第 101 行定义.

◆ isPaused()

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

True when paused.

在文件 Tween.h 第 99 行定义.

◆ isRunning()

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

True when running.

在文件 Tween.h 第 97 行定义.

◆ isStopped()

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

True when stopped.

在文件 Tween.h 第 103 行定义.

◆ operator=()

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

◆ pause()

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

Pause.

在文件 Tween.cpp 第 214 行定义.

◆ reset()

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

Resets .

在文件 Tween.cpp 第 231 行定义.

引用了 tr.

◆ resume()

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

Resume.

在文件 Tween.cpp 第 218 行定义.

◆ setDelay()

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

Sets the delay.

在文件 Tween.cpp 第 117 行定义.

◆ setDelta()

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

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

在文件 Tween.cpp 第 52 行定义.

引用了 name , 以及 tr.

◆ setDeltaAngle()

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

Sets the delta angle.

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

引用了 name , 以及 tr.

◆ setDuration()

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

Sets the duration.

在文件 Tween.cpp 第 112 行定义.

被这些函数引用 Tween().

◆ setEase()

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

Sets the ease.

在文件 Tween.cpp 第 122 行定义.

引用了 kind.

◆ setFrom()

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

Sets the from.

在文件 Tween.cpp 第 36 行定义.

引用了 name, tr , 以及 value.

◆ setFromAngle()

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

Sets the from angle.

在文件 Tween.cpp 第 60 行定义.

引用了 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.cpp 第 128 行定义.

引用了 count.

◆ setTo()

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

Sets the to.

在文件 Tween.cpp 第 44 行定义.

引用了 name, tr , 以及 value.

◆ setToAngle()

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

Sets the to angle.

在文件 Tween.cpp 第 68 行定义.

引用了 name , 以及 tr.

◆ setYoyo()

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

Sets the yoyo.

在文件 Tween.h 第 81 行定义.

引用了 enabled.

◆ start()

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

Starts .

在文件 Tween.cpp 第 204 行定义.

◆ stop()

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

Stops .

在文件 Tween.cpp 第 226 行定义.

◆ update()

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

Advance by dt seconds; legacy facade that forwards to advance().

在文件 Tween.cpp 第 304 行定义.

引用了 advance(), isActive(), eve::animation::detail::legacyStep() , 以及 step.

友元及相关函数文档

◆ Animation

friend class Animation
friend

在文件 Tween.h 第 136 行定义.


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