Panda3D
Public Types | Public Member Functions | Static Public Member Functions | Friends

VrpnTrackerDevice Class Reference

The Panda interface to a VRPN tracker. More...

#include "vrpnTrackerDevice.h"

Inheritance diagram for VrpnTrackerDevice:
ClientTrackerDevice ClientDevice TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase

List of all members.

Public Types

enum  DataType { DT_position, DT_velocity, DT_acceleration }

Public Member Functions

 VrpnTrackerDevice (VrpnClient *client, const string &device_name, int sensor, DataType data_type, VrpnTracker *vrpn_tracker)
virtual TypeHandle force_init_type ()
DataType get_data_type () const
 Returns the type of data this device represents from the VrpnTracker.
int get_sensor () const
 Returns the particular sensor index that this device wants to hear about from the VrpnTracker.
virtual TypeHandle get_type () const
VrpnTrackerget_vrpn_tracker () const
 Returns a pointer to the particular VrpnTracker this device gets its data from.

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.

Friends

class VrpnTracker

Detailed Description

The Panda interface to a VRPN tracker.

This object will be returned by VrpnClient::make_device(), for attaching to a TrackerNode.

It represents the data from just one particular sensor of a named VRPN tracker, and may reflect either the sensor's position, its velocity, or its acceleration.

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

Definition at line 38 of file vrpnTrackerDevice.h.


Member Function Documentation

VrpnTrackerDevice::DataType VrpnTrackerDevice::get_data_type ( ) const [inline]

Returns the type of data this device represents from the VrpnTracker.

This may be position, velocity, or acceleration.

Definition at line 35 of file vrpnTrackerDevice.I.

int VrpnTrackerDevice::get_sensor ( ) const [inline]

Returns the particular sensor index that this device wants to hear about from the VrpnTracker.

Definition at line 23 of file vrpnTrackerDevice.I.

VrpnTracker * VrpnTrackerDevice::get_vrpn_tracker ( ) const [inline]

Returns a pointer to the particular VrpnTracker this device gets its data from.

This pointer may be shared with other VrpnTrackerDevice objects (each representing a different portion of the tracker data).

Definition at line 49 of file vrpnTrackerDevice.I.

static void VrpnTrackerDevice::init_type ( ) [inline, static]

This function is declared non-inline to work around a compiler bug in g++ 2.96.

Making it inline seems to cause problems in the optimizer.

Reimplemented from ClientTrackerDevice.

Definition at line 64 of file vrpnTrackerDevice.h.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations