Panda3D

Loading...
Searching...
No Matches
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.
bool | is_empty () const
| Returns true if no VrpnTrackerDevices reference this VrpnTracker, or false otherwise.
void | mark (VrpnTrackerDevice *device)
| Adds the indicated VrpnTrackerDevice to the list of devices that are sharing this VrpnTracker.
void | output (std::ostream &out) const
void | poll ()
| Polls the connected device.
void | unmark (VrpnTrackerDevice *device)
| Removes the indicated VrpnTrackerDevice from the list of devices that are sharing this VrpnTracker.
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.

## Constructor & Destructor Documentation

## ◆ VrpnTracker()

VrpnTracker::VrpnTracker | ( | const std::string & | tracker_name,
|  | vrpn_Connection * | connection )

Definition at line 26 of file vrpnTracker.cxx.

## ◆ ~VrpnTracker()

VrpnTracker::~VrpnTracker | ( |  | ) |

Definition at line 40 of file vrpnTracker.cxx.

## 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 18 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 27 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 49 of file vrpnTracker.cxx.

## ◆ output()

void VrpnTracker::output | ( | std::ostream & | out | ) | const

Definition at line 87 of file vrpnTracker.cxx.

## ◆ poll()

void VrpnTracker::poll | ( |  | ) |

Polls the connected device.

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

Definition at line 79 of file vrpnTracker.cxx.

## ◆ unmark()

void VrpnTracker::unmark | ( | VrpnTrackerDevice * | device | ) |

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

Definition at line 61 of file vrpnTracker.cxx.

## ◆ write()

void VrpnTracker::write | ( | std::ostream & | out,
|  | int | indent_level = 0 ) const

Definition at line 95 of file vrpnTracker.cxx.

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

- panda/src/vrpn/vrpnTracker.h
- panda/src/vrpn/vrpnTracker.cxx
- panda/src/vrpn/vrpnTracker.I