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

Control-theory procedural animation for named scalar properties. 更多...

#include <ControlAnim.h>

Public 成员函数

 ControlAnim (float frequencyHz=3.f, float dampingZeta=1.f, float response=1.f)
 
 ~ControlAnim ()=default
 
 ControlAnim (const ControlAnim &)=delete
 
ControlAnimoperator= (const ControlAnim &)=delete
 
void setFrequency (float frequencyHz)
 
float getFrequency () const
 
void setDamping (float dampingZeta)
 
float getDamping () const
 
void setResponse (float response)
 
float getResponse () const
 
void setIntegrator (const std::string &kind)
 Integrator: "secondOrder" | "spring" | "pd". Invalid → exception.
 
std::string getIntegrator () const
 
void set (const std::string &name, float value)
 Create/update a channel: current value snaps to value, velocity cleared.
 
void setTarget (const std::string &name, float value)
 Move the tracking target (does not snap state). Creates channel if missing.
 
void setTargetVelocity (const std::string &name, float velocity)
 Optional explicit target velocity (used by secondOrder / pd).
 
void impulse (const std::string &name, float deltaVelocity)
 Inject an instantaneous velocity impulse (procedural “hit”).
 
bool has (const std::string &name) const
 
float get (const std::string &name) const
 
float getVelocity (const std::string &name) const
 
float getTarget (const std::string &name) const
 
void clear ()
 
void remove (const std::string &name)
 
int getPropertyCount () const
 
std::string getPropertyName (int index) const
 
void update (float dt)
 Advance all channels by dt seconds.
 

详细描述

Control-theory procedural animation for named scalar properties.

Tracks continuous targets with a second-order LTI system (default), a closed-form damped spring, or an explicit unit-mass PD law. Script type: ControlAnim.

Integrator kinds (string, no overloads):

  • "secondOrder" — ÿ + k1 ẏ + k2 y = x + k3 ẋ (f, ζ, r)
  • "spring" — closed-form damped spring about set-point (f, ζ; r ignored)
  • "pd" — τ/m = Kp(x − y) + Kd(ẋ − ẏ) with Kp=ω², Kd=2ζω

在文件 ControlAnim.h23 行定义.

构造及析构函数说明

◆ ControlAnim() [1/2]

eve::animation::ControlAnim::ControlAnim ( float  frequencyHz = 3.f,
float  dampingZeta = 1.f,
float  response = 1.f 
)

在文件 ControlAnim.cpp9 行定义.

◆ ~ControlAnim()

eve::animation::ControlAnim::~ControlAnim ( )
default

◆ ControlAnim() [2/2]

eve::animation::ControlAnim::ControlAnim ( const ControlAnim )
delete

成员函数说明

◆ clear()

void eve::animation::ControlAnim::clear ( )

在文件 ControlAnim.cpp117 行定义.

◆ get()

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

在文件 ControlAnim.cpp102 行定义.

引用了 name.

◆ getDamping()

float eve::animation::ControlAnim::getDamping ( ) const
inline

在文件 ControlAnim.h34 行定义.

◆ getFrequency()

float eve::animation::ControlAnim::getFrequency ( ) const
inline

在文件 ControlAnim.h32 行定义.

◆ getIntegrator()

std::string eve::animation::ControlAnim::getIntegrator ( ) const

在文件 ControlAnim.cpp42 行定义.

◆ getPropertyCount()

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

在文件 ControlAnim.h58 行定义.

◆ getPropertyName()

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

在文件 ControlAnim.cpp127 行定义.

◆ getResponse()

float eve::animation::ControlAnim::getResponse ( ) const
inline

在文件 ControlAnim.h36 行定义.

◆ getTarget()

float eve::animation::ControlAnim::getTarget ( const std::string &  name) const

在文件 ControlAnim.cpp112 行定义.

引用了 name.

◆ getVelocity()

float eve::animation::ControlAnim::getVelocity ( const std::string &  name) const

在文件 ControlAnim.cpp107 行定义.

引用了 name.

◆ has()

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

在文件 ControlAnim.cpp98 行定义.

引用了 name.

◆ impulse()

void eve::animation::ControlAnim::impulse ( const std::string &  name,
float  deltaVelocity 
)

Inject an instantaneous velocity impulse (procedural “hit”).

在文件 ControlAnim.cpp93 行定义.

引用了 name.

◆ operator=()

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

◆ remove()

void eve::animation::ControlAnim::remove ( const std::string &  name)

在文件 ControlAnim.cpp122 行定义.

引用了 name.

◆ set()

void eve::animation::ControlAnim::set ( const std::string &  name,
float  value 
)

Create/update a channel: current value snaps to value, velocity cleared.

在文件 ControlAnim.cpp65 行定义.

引用了 name , 以及 value.

◆ setDamping()

void eve::animation::ControlAnim::setDamping ( float  dampingZeta)

在文件 ControlAnim.cpp19 行定义.

◆ setFrequency()

void eve::animation::ControlAnim::setFrequency ( float  frequencyHz)

在文件 ControlAnim.cpp14 行定义.

◆ setIntegrator()

void eve::animation::ControlAnim::setIntegrator ( const std::string &  kind)

Integrator: "secondOrder" | "spring" | "pd". Invalid → exception.

在文件 ControlAnim.cpp29 行定义.

引用了 kind.

◆ setResponse()

void eve::animation::ControlAnim::setResponse ( float  response)

在文件 ControlAnim.cpp24 行定义.

◆ setTarget()

void eve::animation::ControlAnim::setTarget ( const std::string &  name,
float  value 
)

Move the tracking target (does not snap state). Creates channel if missing.

在文件 ControlAnim.cpp76 行定义.

引用了 name , 以及 value.

◆ setTargetVelocity()

void eve::animation::ControlAnim::setTargetVelocity ( const std::string &  name,
float  velocity 
)

Optional explicit target velocity (used by secondOrder / pd).

在文件 ControlAnim.cpp87 行定义.

引用了 name.

◆ update()

void eve::animation::ControlAnim::update ( float  dt)

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