Panda3D
Loading...
Searching...
No Matches
dialNode.I
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file dialNode.I
10 * @author drose
11 * @date 2002-03-12
12 */
13
14/**
15 * Returns true if the DialNode is valid and connected to a server, false
16 * otherwise.
17 */
18INLINE bool DialNode::
19is_valid() const {
20 return (_dial != nullptr) && _dial->is_connected();
21}
22
23/**
24 * Returns the number of dial dials known to the DialNode. This number may
25 * change as more dials are discovered.
26 */
27INLINE int DialNode::
28get_num_dials() const {
29 return _dial->get_num_dials();
30}
31
32/**
33 * Returns the number of complete revolutions of the dial since the last time
34 * read_dial() was called. This is a destructive operation; it is not
35 * possible to read the dial without resetting the counter.
36 */
37INLINE double DialNode::
38read_dial(int index) {
39 return _dial->read_dial(index);
40}
41
42/**
43 * Returns true if the state of the indicated dial dial is known, or false if
44 * we have never heard anything about this particular dial.
45 */
46INLINE bool DialNode::
47is_dial_known(int index) const {
48 return _dial->is_dial_known(index);
49}
int get_num_dials() const
Returns the number of dial dials known to the DialNode.
Definition dialNode.I:28
bool is_valid() const
Returns true if the DialNode is valid and connected to a server, false otherwise.
Definition dialNode.I:19
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...
Definition dialNode.I:47
double read_dial(int index)
Returns the number of complete revolutions of the dial since the last time read_dial() was called.
Definition dialNode.I:38