Panda3D
|
00001 // Filename: trackerData.h 00002 // Created by: jason (04Aug00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef TRACKERDATA_H 00016 #define TRACKERDATA_H 00017 00018 #include "pandabase.h" 00019 #include "luse.h" 00020 00021 //////////////////////////////////////////////////////////////////// 00022 // Class : TrackerData 00023 // Description : Stores the kinds of data that a tracker might output. 00024 //////////////////////////////////////////////////////////////////// 00025 class EXPCL_PANDA_DEVICE TrackerData { 00026 public: 00027 INLINE TrackerData(); 00028 INLINE TrackerData(const TrackerData ©); 00029 void operator = (const TrackerData ©); 00030 00031 INLINE void clear(); 00032 00033 INLINE void set_time(double time); 00034 INLINE bool has_time() const; 00035 INLINE double get_time() const; 00036 00037 INLINE void set_pos(const LPoint3 &pos); 00038 INLINE bool has_pos() const; 00039 INLINE const LPoint3 &get_pos() const; 00040 00041 INLINE void set_orient(const LOrientation &orient); 00042 INLINE bool has_orient() const; 00043 INLINE const LOrientation &get_orient() const; 00044 00045 INLINE void set_dt(double dt); 00046 INLINE bool has_dt() const; 00047 INLINE double get_dt() const; 00048 00049 private: 00050 enum Flags { 00051 F_has_time = 0x0001, 00052 F_has_pos = 0x0002, 00053 F_has_orient = 0x0004, 00054 F_has_dt = 0x0008, 00055 }; 00056 00057 int _flags; 00058 00059 double _time; 00060 LPoint3 _pos; 00061 LOrientation _orient; 00062 double _dt; 00063 }; 00064 00065 #include "trackerData.I" 00066 00067 #endif