#include <Control.h>
Inheritance diagram for Teddy::Behaviour::Control:
Public Methods | |
Control (double max_delta, double max, Teddy::MixIn::Options options, double dampen_const) | |
Constructor. More... | |
virtual void | tick () |
Update Control (Teddy::MixIn::Tick API). More... | |
void | setValue (double value) |
double | getValue () const |
double | getMin () const |
double | getMax () const |
double | getDelta () const |
double | getDampConst () const |
void | setDelta (double max_delta) |
void | setDampConst (double dampen_const) |
void | adjust (double analog) |
Adjust Control value. More... | |
void | more (bool apply) |
Activate or deactivate more Control. More... | |
void | less (bool apply) |
Activate or deactivate less Control. More... | |
void | stop (bool apply) |
Stop Control. More... | |
void | inhibit (bool apply) |
void | clear () |
void | dampen () |
Dampen Control. More... | |
Static Public Attributes | |
const unsigned long | RESERVED = 0ul |
const unsigned long | MORE = 1ul |
const unsigned long | LESS = 2ul |
const unsigned long | STOP = 3ul |
const unsigned long | ACTIVE = 4ul |
const unsigned long | INHIBIT = 5ul |
const unsigned long | DAMPEN_LINEAR = 6ul |
const unsigned long | DAMPEN_MULTIPLY = 7ul |
const unsigned long | DAMPEN_MASTER = 8ul |
const unsigned long | RESERVED_M = (1ul<<Control::RESERVED ) |
const unsigned long | MORE_M = (1ul<<Control::MORE ) |
const unsigned long | LESS_M = (1ul<<Control::LESS ) |
const unsigned long | STOP_M = (1ul<<Control::STOP ) |
const unsigned long | ACTIVE_M = (1ul<<Control::ACTIVE ) |
const unsigned long | INHIBIT_M = (1ul<<Control::INHIBIT ) |
const unsigned long | DAMPEN_LINEAR_M = (1ul<<Control::DAMPEN_LINEAR ) |
const unsigned long | DAMPEN_MULTIPLY_M = (1ul<<Control::DAMPEN_MULTIPLY) |
const unsigned long | DAMPEN_MASTER_M = (1ul<<Control::DAMPEN_MASTER ) |
const unsigned long | CLEAR_M |
Protected Attributes | |
double | dampen_const |
Multiplying dampening constant. More... | |
double | max_delta |
Maximum change. More... | |
double | min |
Mimimum value. More... | |
double | max |
Maximum value. More... | |
double | c_delta |
Currently active change. More... | |
double | c_value |
Current value. More... |
|
Constructor.
Definition at line 61 of file Control.cpp. |
|
Adjust Control value.
Definition at line 145 of file Control.cpp. References c_value, max, and min. Referenced by tick. |
|
Definition at line 121 of file Control.cpp. References c_delta, c_value, and Teddy::MixIn::Options::disable. |
|
Dampen Control.
Definition at line 157 of file Control.cpp. References c_value, dampen_const, Teddy::MixIn::Options::isDisabled, Teddy::MixIn::Options::isEnabled, and max_delta. Referenced by tick. |
|
Definition at line 106 of file Control.cpp. References dampen_const. |
|
Definition at line 101 of file Control.cpp. References max_delta. |
|
Definition at line 96 of file Control.cpp. References max. |
|
Definition at line 91 of file Control.cpp. References min. |
|
Definition at line 86 of file Control.cpp. References c_value. |
|
|
|
Activate or deactivate less Control.
Definition at line 201 of file Control.cpp. References c_delta, Teddy::MixIn::Options::disable, Teddy::MixIn::Options::enable, Teddy::MixIn::Options::isEnabled, and max_delta. |
|
Activate or deactivate more Control.
Definition at line 184 of file Control.cpp. References c_delta, Teddy::MixIn::Options::disable, Teddy::MixIn::Options::enable, Teddy::MixIn::Options::isEnabled, and max_delta. |
|
Definition at line 116 of file Control.cpp. References dampen_const. |
|
Definition at line 111 of file Control.cpp. References max_delta. |
|
Definition at line 81 of file Control.cpp. References c_value. |
|
Stop Control.
Definition at line 218 of file Control.cpp. References c_delta, c_value, Teddy::MixIn::Options::disable, Teddy::MixIn::Options::enable, Teddy::MixIn::Options::isDisabled, Teddy::MixIn::Options::isEnabled, and max_delta. |
|
Update Control (Teddy::MixIn::Tick API).
Reimplemented from Teddy::MixIn::Tick. Definition at line 134 of file Control.cpp. References adjust, c_delta, dampen, Teddy::MixIn::Options::isDisabled, and Teddy::MixIn::Options::isEnabled. |
|
Definition at line 36 of file Control.cpp. |
|
Definition at line 46 of file Control.cpp. |
|
Currently active change.
|
|
Current value.
Definition at line 94 of file Control.h. Referenced by adjust, clear, dampen, getValue, setValue, and stop. |
|
Initial value: Control::MORE_M | Control::LESS_M | Control::STOP_M | Control::ACTIVE_M | Control::INHIBIT_M Definition at line 52 of file Control.cpp. |
|
Multiplying dampening constant.
Definition at line 89 of file Control.h. Referenced by dampen, getDampConst, and setDampConst. |
|
Definition at line 38 of file Control.cpp. |
|
Definition at line 48 of file Control.cpp. |
|
Definition at line 40 of file Control.cpp. |
|
Definition at line 50 of file Control.cpp. |
|
Definition at line 39 of file Control.cpp. |
|
Definition at line 49 of file Control.cpp. |
|
Definition at line 37 of file Control.cpp. |
|
Definition at line 47 of file Control.cpp. |
|
Definition at line 34 of file Control.cpp. |
|
Definition at line 44 of file Control.cpp. |
|
Maximum value.
|
|
Maximum change.
Definition at line 90 of file Control.h. Referenced by dampen, getDelta, less, more, setDelta, and stop. |
|
Mimimum value.
|
|
Definition at line 33 of file Control.cpp. |
|
Definition at line 43 of file Control.cpp. |
|
Definition at line 32 of file Control.cpp. |
|
Definition at line 42 of file Control.cpp. |
|
Definition at line 35 of file Control.cpp. |
|
Definition at line 45 of file Control.cpp. |