Panda3D
trackerData.h
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 
15 #ifndef TRACKERDATA_H
16 #define TRACKERDATA_H
17 
18 #include "pandabase.h"
19 #include "luse.h"
20 
21 ////////////////////////////////////////////////////////////////////
22 // Class : TrackerData
23 // Description : Stores the kinds of data that a tracker might output.
24 ////////////////////////////////////////////////////////////////////
25 class EXPCL_PANDA_DEVICE TrackerData {
26 public:
27  INLINE TrackerData();
28  INLINE TrackerData(const TrackerData &copy);
29  void operator = (const TrackerData &copy);
30 
31  INLINE void clear();
32 
33  INLINE void set_time(double time);
34  INLINE bool has_time() const;
35  INLINE double get_time() const;
36 
37  INLINE void set_pos(const LPoint3 &pos);
38  INLINE bool has_pos() const;
39  INLINE const LPoint3 &get_pos() const;
40 
41  INLINE void set_orient(const LOrientation &orient);
42  INLINE bool has_orient() const;
43  INLINE const LOrientation &get_orient() const;
44 
45  INLINE void set_dt(double dt);
46  INLINE bool has_dt() const;
47  INLINE double get_dt() const;
48 
49 private:
50  enum Flags {
51  F_has_time = 0x0001,
52  F_has_pos = 0x0002,
53  F_has_orient = 0x0004,
54  F_has_dt = 0x0008,
55  };
56 
57  int _flags;
58 
59  double _time;
60  LPoint3 _pos;
61  LOrientation _orient;
62  double _dt;
63 };
64 
65 #include "trackerData.I"
66 
67 #endif
This is a unit quaternion representing an orientation.
Definition: lorientation.h:92
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99
Stores the kinds of data that a tracker might output.
Definition: trackerData.h:25