Panda3D
Public Member Functions | Static Public Member Functions | List of all members
ClientBase Class Reference

An abstract base class for a family of client device interfaces–including trackers, buttons, dials, and other analog inputs. More...

Inheritance diagram for ClientBase:
TypedReferenceCount TypedObject ReferenceCount VrpnClient DirectDeviceManager

Public Member Functions

bool forkAsynchronousThread (double poll_time)
 Forks a separate thread to do all the polling of connected devices. More...
 
CoordinateSystem getCoordinateSystem ()
 Returns the coordinate system that all devices associated with this client will operate in. More...
 
double getLastPollTime ()
 Returns the time (according to the global ClockObject's get_real_time() method) of the last device poll. More...
 
bool isForked ()
 Returns true if the ClientBase has been forked (and, therefore, poll() does not need to be called), false otherwise. More...
 
bool poll ()
 Initiates a poll of the client devices, if we are not forked and if we have not already polled this frame. More...
 
 setCoordinateSystem (CoordinateSystem cs)
 Specifies the coordinate system that all devices associated with this client will operate in. More...
 
- Public Member Functions inherited from TypedObject
TypeHandle getType ()
 
int getTypeIndex ()
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. More...
 
bool isExactType (TypeHandle handle)
 Returns true if the current object is the indicated type exactly. More...
 
bool isOfType (TypeHandle handle)
 Returns true if the current object is or derives from the indicated type. More...
 
- Public Member Functions inherited from ReferenceCount
int getRefCount ()
 Returns the current reference count. More...
 
 ref ()
 Explicitly increments the reference count. More...
 
bool testRefCountIntegrity ()
 Does some easy checks to make sure that the reference count isn't completely bogus. More...
 
bool testRefCountNonzero ()
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More...
 
bool unref ()
 Explicitly decrements the reference count. More...
 

Static Public Member Functions

static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from TypedReferenceCount
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from TypedObject
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from ReferenceCount
static TypeHandle getClassType ()
 

Additional Inherited Members

- Public Attributes inherited from TypedObject
TypeHandle type
 Returns the TypeHandle representing this object's type. More...
 
- Public Attributes inherited from ReferenceCount
int ref_count
 The current reference count. More...
 

Detailed Description

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.

Member Function Documentation

◆ forkAsynchronousThread()

bool forkAsynchronousThread ( double  poll_time)

Forks a separate thread to do all the polling of connected devices.

The forked thread will poll after every poll_time seconds has elapsed. Returns true if the fork was successful, or false otherwise (for instance, because we were already forked, or because asynchronous threads are disabled).

◆ getClassType()

static TypeHandle getClassType ( )
static

◆ getCoordinateSystem()

CoordinateSystem getCoordinateSystem ( )

Returns the coordinate system that all devices associated with this client will operate in.

Normally, this is CS_default.

◆ getLastPollTime()

double getLastPollTime ( )

Returns the time (according to the global ClockObject's get_real_time() method) of the last device poll.

◆ isForked()

bool isForked ( )

Returns true if the ClientBase has been forked (and, therefore, poll() does not need to be called), false otherwise.

◆ poll()

bool poll ( )

Initiates a poll of the client devices, if we are not forked and if we have not already polled this frame.

Returns true if the poll occurred, or false if it did not.

◆ setCoordinateSystem()

setCoordinateSystem ( CoordinateSystem  cs)

Specifies the coordinate system that all devices associated with this client will operate in.

Normally, this is CS_default.