An abstract base class for a family of client device interfaces--including trackers, buttons, dials, and other analog inputs.
More...
Public Member Functions |
|
virtual TypeHandle | force_init_type () |
| bool | fork_asynchronous_thread (double poll_time) |
| | Forks a separate thread to do all the polling of connected devices.
|
| CoordinateSystem | get_coordinate_system () const |
| | Returns the coordinate system that all devices associated with this client will operate in.
|
| double | get_last_poll_time () const |
| | Returns the time (according to the global ClockObject's get_real_time() method) of the last device poll.
|
|
virtual TypeHandle | get_type () const |
| bool | is_forked () const |
| | Returns true if the ClientBase has been forked (and, therefore, poll() does not need to be called), false otherwise.
|
| bool | poll () |
| | Initiates a poll of the client devices, if we are not forked and if we have not already polled this frame.
|
|
| PT (ClientDevice) get_device(TypeHandle device_type |
| void | set_coordinate_system (CoordinateSystem cs) |
| | Specifies the coordinate system that all devices associated with this client will operate in.
|
Static Public Member Functions |
|
static TypeHandle | get_class_type () |
| static void | init_type () |
| | This function is declared non-inline to work around a compiler bug in g++ 2.96.
|
Public Attributes |
|
const string & | device_name |
Protected Member Functions |
| virtual bool | disconnect_device (TypeHandle device_type, const string &device_name, ClientDevice *device) |
| | Removes the device, which is presumably about to destruct, from the list of connected devices, and frees any data required to support it.
|
| virtual void | do_poll () |
| | Implements the polling and updating of connected devices, if the ClientBase requires this.
|
|
virtual | PT (ClientDevice) make_device(TypeHandle device_type |
Protected Attributes |
|
virtual const string & | device_name = 0 |
Friends |
|
class | ClientDevice |
An abstract base class for a family of client device interfaces--including trackers, buttons, dials, and other analog inputs.
This provides a common interface to connect to such devices and extract their data; it is used by TrackerNode etc. to put these devices in the data graph.
Definition at line 47 of file clientBase.h.
Removes the device, which is presumably about to destruct, from the list of connected devices, and frees any data required to support it.
This device will no longer receive automatic updates with each poll.
The return value is true if the device was disconnected, or false if it was unknown (e.g. it was disconnected previously).
Reimplemented in VrpnClient.
Definition at line 167 of file clientBase.cxx.
Referenced by ClientDevice::disconnect(), and VrpnClient::disconnect_device().