17 INLINE ClientDialDevice::DialState::
27 INLINE ClientDialDevice::
28 ClientDialDevice(
ClientBase *client,
const std::string &device_name):
49 ensure_dial_index(index);
50 nassertv(index >= 0 && index < (
int)_dials.size());
51 _dials[index]._offset += offset;
52 _dials[index]._known =
true;
65 if (index >= 0 && index < (
int)_dials.size()) {
66 double result = _dials[index]._offset;
67 _dials[index]._offset = 0.0;
80 if (index >= 0 && index < (
int)_dials.size()) {
81 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...
int get_num_dials() const
Returns the number of dial dials known to the ClientDialDevice.
An abstract base class for a family of client device interfaces–including trackers,...
Any of a number of different devices that might be attached to a ClientBase, including trackers,...