trackerData.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. // Filename: trackerData.h
  2. // Created by: jason (04Aug00)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) Carnegie Mellon University. All rights reserved.
  8. //
  9. // All use of this software is subject to the terms of the revised BSD
  10. // license. You should have received a copy of this license along
  11. // with this source code in a file named "LICENSE."
  12. //
  13. ////////////////////////////////////////////////////////////////////
  14. #ifndef TRACKERDATA_H
  15. #define TRACKERDATA_H
  16. #include "pandabase.h"
  17. #include "luse.h"
  18. ////////////////////////////////////////////////////////////////////
  19. // Class : TrackerData
  20. // Description : Stores the kinds of data that a tracker might output.
  21. ////////////////////////////////////////////////////////////////////
  22. class EXPCL_PANDA_DEVICE TrackerData {
  23. public:
  24. INLINE TrackerData();
  25. INLINE TrackerData(const TrackerData &copy);
  26. void operator = (const TrackerData &copy);
  27. INLINE void clear();
  28. INLINE void set_time(double time);
  29. INLINE bool has_time() const;
  30. INLINE double get_time() const;
  31. INLINE void set_pos(const LPoint3f &pos);
  32. INLINE bool has_pos() const;
  33. INLINE const LPoint3f &get_pos() const;
  34. INLINE void set_orient(const LOrientationf &orient);
  35. INLINE bool has_orient() const;
  36. INLINE const LOrientationf &get_orient() const;
  37. INLINE void set_dt(double dt);
  38. INLINE bool has_dt() const;
  39. INLINE double get_dt() const;
  40. private:
  41. enum Flags {
  42. F_has_time = 0x0001,
  43. F_has_pos = 0x0002,
  44. F_has_orient = 0x0004,
  45. F_has_dt = 0x0008,
  46. };
  47. int _flags;
  48. double _time;
  49. LPoint3f _pos;
  50. LOrientationf _orient;
  51. double _dt;
  52. };
  53. #include "trackerData.I"
  54. #endif