Panda3D
Public Member Functions | List of all members
VrpnTracker Class Reference

This is the actual interface to a particular VRPN tracker object, and all of its sensors. More...

#include "vrpnTracker.h"

Public Member Functions

 VrpnTracker (const std::string &tracker_name, vrpn_Connection *connection)
 
const std::string & get_tracker_name () const
 Returns the name of the tracker device that was used to create this VrpnTracker. More...
 
bool is_empty () const
 Returns true if no VrpnTrackerDevices reference this VrpnTracker, or false otherwise. More...
 
void mark (VrpnTrackerDevice *device)
 Adds the indicated VrpnTrackerDevice to the list of devices that are sharing this VrpnTracker. More...
 
void output (std::ostream &out) const
 
void poll ()
 Polls the connected device. More...
 
void unmark (VrpnTrackerDevice *device)
 Removes the indicated VrpnTrackerDevice from the list of devices that are sharing this VrpnTracker. More...
 
void write (std::ostream &out, int indent_level=0) const
 

Detailed Description

This is the actual interface to a particular VRPN tracker object, and all of its sensors.

A pointer to this object is stored in the VrpnClient class for each differently-named VRPN tracker we connect to.

The VRPN callbacks go here, which in turn get vectored out to any VrpnTrackerDevice objects that register with this. When the last VrpnTrackerDevice object unregisters, the VrpnTracker will be deleted by the VrpnClient.

This class does not need to be exported from the DLL.

Definition at line 37 of file vrpnTracker.h.

Member Function Documentation

◆ get_tracker_name()

const std::string & VrpnTracker::get_tracker_name ( ) const
inline

Returns the name of the tracker device that was used to create this VrpnTracker.

Definition at line 19 of file vrpnTracker.I.

◆ is_empty()

bool VrpnTracker::is_empty ( ) const
inline

Returns true if no VrpnTrackerDevices reference this VrpnTracker, or false otherwise.

Definition at line 28 of file vrpnTracker.I.

◆ mark()

void VrpnTracker::mark ( VrpnTrackerDevice device)

Adds the indicated VrpnTrackerDevice to the list of devices that are sharing this VrpnTracker.

Definition at line 50 of file vrpnTracker.cxx.

◆ poll()

void VrpnTracker::poll ( )
inline

Polls the connected device.

Normally you should not call this directly; this will be called by the VrpnClient.

Definition at line 37 of file vrpnTracker.I.

◆ unmark()

void VrpnTracker::unmark ( VrpnTrackerDevice device)

Removes the indicated VrpnTrackerDevice from the list of devices that are sharing this VrpnTracker.

Definition at line 62 of file vrpnTracker.cxx.


The documentation for this class was generated from the following files: