Panda3D
panda
src
device
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
*/
18
INLINE
bool
DialNode::
19
is_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
*/
27
INLINE
int
DialNode::
28
get_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
*/
37
INLINE
double
DialNode::
38
read_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
*/
46
INLINE
bool
DialNode::
47
is_dial_known
(
int
index)
const
{
48
return
_dial->is_dial_known(index);
49
}
DialNode::is_valid
bool is_valid() const
Returns true if the DialNode is valid and connected to a server, false otherwise.
Definition:
dialNode.I:19
DialNode::get_num_dials
int get_num_dials() const
Returns the number of dial dials known to the DialNode.
Definition:
dialNode.I:28
DialNode::read_dial
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
DialNode::is_dial_known
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
Generated on Sun Dec 27 2020 13:22:50 for Panda3D by
1.8.20