20 INLINE ClientDialDevice::DialState::
32 INLINE ClientDialDevice::
33 ClientDialDevice(
ClientBase *client,
const string &device_name):
59 ensure_dial_index(index);
60 nassertv(index >= 0 && index < (
int)_dials.size());
61 _dials[index]._offset += offset;
62 _dials[index]._known =
true;
78 if (index >= 0 && index < (
int)_dials.size()) {
79 double result = _dials[index]._offset;
80 _dials[index]._offset = 0.0;
96 if (index >= 0 && index < (
int)_dials.size()) {
97 return _dials[index]._known;
double read_dial(int index)
Returns the number of complete revolutions of the dial since the last time read_dial() was called...
void push_dial(int index, double offset)
Marks that the dial has been offset by the indicated amount.
bool is_dial_known(int index) const
Returns true if the state of the indicated dial dial is known, or false if we have never heard anythi...
An abstract base class for a family of client device interfaces–including trackers, buttons, dials, and other analog inputs.
int get_num_dials() const
Returns the number of dial dials known to the ClientDialDevice.
Any of a number of different devices that might be attached to a ClientBase, including trackers...