Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TrackerData Class Reference

Stores the kinds of data that a tracker might output. More...

#include <trackerData.h>

List of all members.

Public Member Functions

 TrackerData ()
 TrackerData (const TrackerData &copy)
void operator= (const TrackerData &copy)
void clear ()
 Removes all data from the structure.

void set_time (double time)
 Indicates the time at which the position information (pos and orient) are effective.

bool has_time () const
 Returns true if the position information time is available.

double get_time () const
 Returns the time at which the position information (pos and orient) are effective.

void set_pos (const LPoint3f &pos)
 Indicates the current position of the tracker sensor in space.

bool has_pos () const
 Returns true if the current position is available.

const LPoint3f & get_pos () const
 Returns the current position of the tracker.

void set_orient (const LOrientationf &orient)
 Indicates the current orientation of the tracker sensor in space.

bool has_orient () const
 Returns true if the current orientation is available.

const LOrientationf & get_orient () const
 Returns the current orientation of the tracker.

void set_dt (double dt)
 Indicates the amount of elapsed time over which which the information (pos and orient) were computed.

bool has_dt () const
 Returns true if the computed elapsed time is available.

double get_dt () const
 Returns the amount of elapsed time over which the information (pos and orient) were computed.


Private Types

enum  Flags { F_has_time = 0x0001, F_has_pos = 0x0002, F_has_orient = 0x0004, F_has_dt = 0x0008 }

Private Attributes

int _flags
double _time
LPoint3f _pos
LOrientationf _orient
double _dt


Detailed Description

Stores the kinds of data that a tracker might output.

Definition at line 35 of file trackerData.h.


Member Enumeration Documentation

enum TrackerData::Flags [private]
 

Enumeration values:
F_has_time 
F_has_pos 
F_has_orient 
F_has_dt 

Definition at line 60 of file trackerData.h.


Constructor & Destructor Documentation

TrackerData::TrackerData  )  [inline]
 

Definition at line 30 of file trackerData.I.

References INLINE.

TrackerData::TrackerData const TrackerData &  copy  )  [inline]
 

Definition at line 43 of file trackerData.I.

References _flags, and INLINE.


Member Function Documentation

void TrackerData::clear  )  [inline]
 

Removes all data from the structure.

Definition at line 56 of file trackerData.I.

References _flags, _time, F_has_time, and INLINE.

double TrackerData::get_dt  )  const [inline]
 

Returns the amount of elapsed time over which the information (pos and orient) were computed.

It is an error to call this if has_dt() does not return true. See set_dt().

Definition at line 285 of file trackerData.I.

const LOrientationf & TrackerData::get_orient  )  const [inline]
 

Returns the current orientation of the tracker.

It is legal to call this if has_orient() returns false; in this case, the result is always the identity orientation.

Definition at line 224 of file trackerData.I.

Referenced by TrackerNode::get_pos(), and TrackerNode::~TrackerNode().

const LPoint3f & TrackerData::get_pos  )  const [inline]
 

Returns the current position of the tracker.

It is legal to call this if has_pos() returns false; in this case, the position will always be (0, 0, 0).

Definition at line 163 of file trackerData.I.

References _orient, has_orient(), and INLINE.

Referenced by TrackerNode::is_valid(), and TrackerNode::~TrackerNode().

double TrackerData::get_time  )  const [inline]
 

Returns the time at which the position information (pos and orient) are effective.

It is an error to call this if has_time() does not return true. See set_time().

Definition at line 112 of file trackerData.I.

bool TrackerData::has_dt  )  const [inline]
 

Returns true if the computed elapsed time is available.

See set_dt().

Definition at line 266 of file trackerData.I.

Referenced by has_orient().

bool TrackerData::has_orient  )  const [inline]
 

Returns true if the current orientation is available.

See set_orient().

Definition at line 205 of file trackerData.I.

References _dt, has_dt(), INLINE, and nassertr.

Referenced by get_pos().

bool TrackerData::has_pos  )  const [inline]
 

Returns true if the current position is available.

See set_pos().

Definition at line 146 of file trackerData.I.

References _flags, F_has_orient, and INLINE.

bool TrackerData::has_time  )  const [inline]
 

Returns true if the position information time is available.

See set_time().

Definition at line 93 of file trackerData.I.

References _flags, _pos, F_has_pos, and INLINE.

Referenced by set_time().

void TrackerData::operator= const TrackerData &  copy  ) 
 

Definition at line 32 of file trackerData.cxx.

void TrackerData::set_dt double  dt  )  [inline]
 

Indicates the amount of elapsed time over which which the information (pos and orient) were computed.

This only makes sense if the information represents velocity or acceleration, rather than position. This is an elapsed time in seconds.

Definition at line 250 of file trackerData.I.

Referenced by VrpnTracker::vrpn_position_callback(), and VrpnTracker::vrpn_velocity_callback().

void TrackerData::set_orient const LOrientationf &  orient  )  [inline]
 

Indicates the current orientation of the tracker sensor in space.

The coordinate system of this orientation is defined by the tracker, but should be the same coordinate system as that reflected by set_pos().

Definition at line 189 of file trackerData.I.

References _flags, F_has_dt, and INLINE.

Referenced by VrpnTracker::vrpn_position_callback(), and VrpnTracker::vrpn_velocity_callback().

void TrackerData::set_pos const LPoint3f &  pos  )  [inline]
 

Indicates the current position of the tracker sensor in space.

The coordinate system of this position is defined by the tracker.

Definition at line 130 of file trackerData.I.

References _flags, _orient, F_has_orient, and INLINE.

Referenced by VrpnTracker::vrpn_position_callback(), and VrpnTracker::vrpn_velocity_callback().

void TrackerData::set_time double  time  )  [inline]
 

Indicates the time at which the position information (pos and orient) are effective.

This is a time elapsed in seconds since some undefined epoch; it may or may not correspond to the clock time indicated in the global ClockObject.

Definition at line 77 of file trackerData.I.

References _time, has_time(), INLINE, and nassertr.

Referenced by VrpnTracker::vrpn_position_callback(), and VrpnTracker::vrpn_velocity_callback().


Member Data Documentation

double TrackerData::_dt [private]
 

Definition at line 72 of file trackerData.h.

Referenced by has_orient().

int TrackerData::_flags [private]
 

Definition at line 67 of file trackerData.h.

Referenced by clear(), has_pos(), has_time(), set_orient(), set_pos(), and TrackerData().

LOrientationf TrackerData::_orient [private]
 

Definition at line 71 of file trackerData.h.

Referenced by get_pos(), and set_pos().

LPoint3f TrackerData::_pos [private]
 

Definition at line 70 of file trackerData.h.

Referenced by has_time().

double TrackerData::_time [private]
 

Definition at line 69 of file trackerData.h.

Referenced by clear(), and set_time().


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:55:42 2003 for Panda by doxygen1.3