Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields

osgTracker::Tracker Class Reference

virtual class for trackers. More...

Inherited by osgTracker::ARTTracker, osgTracker::NFLTracker, osgTracker::SimulatedTracker, and osgTracker::VRPNTracker.


Public Member Functions

TrackedTransformgetTransform (std::size_t n)
 return the TrackedTransform stored in the list at positon pos

virtual void update (void)=0
std::size_t getNumTransforms (void) const
 Get the number of transforms associated with this device.

virtual bool requestSensor (unsigned int sensorID)
 Request that sensor sensorID be assigned to a transformation.


Protected Types

typedef std::vector< osg::ref_ptr<
TrackedTransform > > 
TransformList

Protected Member Functions

 Tracker (std::size_t numTrackedTransforms=0)
 Create a new tracker.

void setTransform (std::size_t pos, TrackedTransform *xform)
 Assign an instance of a tracked transform to the device.

void addTransform (TrackedTransform *xform)
 Push back a transform.


Protected Attributes

TransformList _transformList


Detailed Description

A tracker is an interface to a tracking subsystem such as VRPN. As such it might have several different types of sensors attached to it.


Constructor & Destructor Documentation

Tracker::Tracker std::size_t  numTrackers = 0  )  [protected]
 

constructor automatically creates as many TrackedTransforms as passed as parameter


Member Function Documentation

TrackedTransform * Tracker::getTransform std::size_t  pos  ) 
 

Return the reference to the ith tracked transform in the sensor. Is this the same as a sensor number?

Parameters:
pos the position on the list
Returns:
a pointer to a trackedTransform

bool Tracker::requestSensor unsigned int  sensorID  )  [virtual]
 

request a sensor.

Parameters:
sensorID the sensor ID.
Returns:
true if sensor exists. False if this sensor is not available.

Reimplemented in osgTracker::VRPNTracker.

void Tracker::setTransform std::size_t  pos,
TrackedTransform xform
[protected]
 

store the tranform xform as the element in the position pos on the list of transforms

Parameters:
pos the position on the list
xform the transform
Returns:
a pointer to a trackedTransform


The documentation for this class was generated from the following files:
Generated on Wed Nov 17 12:22:38 2004 for osgAR by doxygen 1.3.7