21 INLINE ClientAnalogDevice::AnalogState::
33 INLINE ClientAnalogDevice::
34 ClientAnalogDevice(
ClientBase *client,
const string &device_name):
48 return _controls.size();
62 ensure_control_index(index);
63 nassertv(index >= 0 && index < (
int)_controls.size());
64 _controls[index]._state = state;
65 _controls[index]._known =
true;
78 if (index >= 0 && index < (
int)_controls.size()) {
79 return _controls[index]._state;
94 if (index >= 0 && index < (
int)_controls.size()) {
95 return _controls[index]._known;
bool is_control_known(int index) const
Returns true if the state of the indicated analog control is known, or false if we have never heard a...
void set_control_state(int index, double state)
Sets the state of the indicated analog index.
double get_control_state(int index) const
Returns the current position of indicated analog control (identified by its index number)...
An abstract base class for a family of client device interfaces–including trackers, buttons, dials, and other analog inputs.
int get_num_controls() const
Returns the number of analog controls known to the ClientAnalogDevice.
Any of a number of different devices that might be attached to a ClientBase, including trackers...