Panda3D

Loading...
Searching...
No Matches
trackerData.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file trackerData.h
10 * @author jason
11 * @date 2000-08-04
12 */
13
14#ifndef TRACKERDATA_H
15#define TRACKERDATA_H
16
17#include "pandabase.h"
18#include "luse.h"
19
20/**
21 * Stores the kinds of data that a tracker might output.
22 */
23 class EXPCL_PANDA_DEVICE TrackerData {
24 public:
25 INLINE TrackerData();
26 INLINE TrackerData(const TrackerData &copy);
27 void operator = (const TrackerData &copy);
28
29 INLINE void clear();
30
31 INLINE void set_time(double time);
32 INLINE bool has_time() const;
33 INLINE double get_time() const;
34
35 INLINE void set_pos(const LPoint3 &pos);
36 INLINE bool has_pos() const;
37 INLINE const LPoint3 &get_pos() const;
38
39 INLINE void set_orient(const LOrientation &orient);
40 INLINE bool has_orient() const;
41 INLINE const LOrientation &get_orient() const;
42
43 INLINE void set_dt(double dt);
44 INLINE bool has_dt() const;
45 INLINE double get_dt() const;
46
47PUBLISHED:
48 MAKE_PROPERTY(time, get_time, set_time);
49 MAKE_PROPERTY(pos, get_pos, set_pos);
50 MAKE_PROPERTY(orient, get_orient, set_orient);
51 MAKE_PROPERTY(dt, get_dt, set_dt);
52
53 private:
54 enum Flags {
55 F_has_time = 0x0001,
56 F_has_pos = 0x0002,
57 F_has_orient = 0x0004,
58 F_has_dt = 0x0008,
59 };
60
61 int _flags;
62
63 double _time;
64 LPoint3 _pos;
65 LOrientation _orient;
66 double _dt;
67};
68
69#include "trackerData.I"
70
71#endif
TrackerData::has_dt
bool has_dt() const
Returns true if the computed elapsed time is available.
Definition trackerData.I:154
TrackerData::has_time
bool has_time() const
Returns true if the position information time is available.
Definition trackerData.I:56
TrackerData::has_pos
bool has_pos() const
Returns true if the current position is available.
Definition trackerData.I:85
TrackerData::set_pos
set_pos
Indicates the current position of the tracker sensor in space.
Definition trackerData.h:49
TrackerData::has_orient
bool has_orient() const
Returns true if the current orientation is available.
Definition trackerData.I:119
TrackerData::set_orient
set_orient
Indicates the current orientation of the tracker sensor in space.
Definition trackerData.h:50
TrackerData::get_pos
get_pos
Returns the current position of the tracker.
Definition trackerData.h:49
TrackerData::get_time
get_time
Returns the time at which the position information (pos and orient) are effective.
Definition trackerData.h:48
TrackerData::set_dt
set_dt
Indicates the amount of elapsed time over which which the information (pos and orient) were computed.
Definition trackerData.h:51
TrackerData::get_orient
get_orient
Returns the current orientation of the tracker.
Definition trackerData.h:50
TrackerData::set_time
set_time
Indicates the time at which the position information (pos and orient) are effective.
Definition trackerData.h:48
TrackerData::get_dt
get_dt
Returns the amount of elapsed time over which the information (pos and orient) were computed.
Definition trackerData.h:51
TrackerData::clear
void clear()
Removes all data from the structure.
Definition trackerData.I:35
luse.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
trackerData.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.