Panda3D
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Member Functions | Static Public Member Functions
DialNode Class Reference

This is the primary interface to infinite dial type devices associated with a ClientBase. More...

Inheritance diagram for DialNode:
DataNode PandaNode TypedWritable Namable LinkedListNode ReferenceCount TypedObject

List of all members.

Public Member Functions

 DialNode (ClientBase client, string device_name)
int getNumDials ()
 Returns the number of dial dials known to the DialNode.
bool isDialKnown (int index)
 Returns true if the state of the indicated dial dial is known, or false if we have never heard anything about this particular dial.
bool isValid ()
 Returns true if the DialNode is valid and connected to a server, false otherwise.
double readDial (int index)
 Returns the number of complete revolutions of the dial since the last time read_dial() was called.

Static Public Member Functions

static TypeHandle getClassType ()

Detailed Description

This is the primary interface to infinite dial type devices associated with a ClientBase.

This creates a node that connects to the named dial device, if it exists, and provides hooks to the user to read the state of any of the sequentially numbered dial controls associated with that device.

A dial is a rotating device that does not have stops--it can keep rotating any number of times. Therefore it does not have a specific position at any given time, unlike an AnalogDevice.


Constructor & Destructor Documentation

DialNode ( ClientBase  client,
string  device_name 
)

Member Function Documentation

static TypeHandle getClassType ( ) [static]

Reimplemented from DataNode.

Returns the number of dial dials known to the DialNode.

This number may change as more dials are discovered.

bool isDialKnown ( int  index)

Returns true if the state of the indicated dial dial is known, or false if we have never heard anything about this particular dial.

bool isValid ( )

Returns true if the DialNode is valid and connected to a server, false otherwise.

double readDial ( int  index)

Returns the number of complete revolutions of the dial since the last time read_dial() was called.

This is a destructive operation; it is not possible to read the dial without resetting the counter.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties