vrpn 07.35
Virtual Reality Peripheral Network
Loading...
Searching...
No Matches
vrpn_Tracker_PhaseSpace.h
Go to the documentation of this file.
1#ifndef VRPN_TRACKER_PHASESPACE_H
2#define VRPN_TRACKER_PHASESPACE_H
3
4#include "vrpn_Configure.h" // IWYU pragma: keep
5
6#ifdef VRPN_INCLUDE_PHASESPACE
7#include <string>
8
9#include "vrpn_Shared.h"
10#include "vrpn_Tracker.h"
11#include "vrpn_Button.h"
12#include "vrpn_Analog.h"
13
14#include "owl.hpp"
15
17
18 public:
19
20 vrpn_Tracker_PhaseSpace(const char *name,
22
23 vrpn_Tracker_PhaseSpace(const char *name,
25 const char* device,
26 float frequency,
27 int readflag,
28 int slaveflag=0);
29
30
32
33 bool debug;
34
35 // vrpn_Tracker
36 virtual void mainloop();
37 static int VRPN_CALLBACK handle_update_rate_request(void *userdata, vrpn_HANDLERPARAM p);
38
39 // parse a tracker specification file and create PhaseSpace trackers
40 bool load(FILE* file);
41
42 // connect to the Impulse system
43 bool InitOWL();
44
45 // start streaming
46 bool enableStreaming(bool enable);
47
48 protected:
49 // vrpn_Tracker
50 virtual int get_report(void);
51 virtual void send_report(void);
52
53 protected:
54
55 // libowl2
56 OWL::Context context;
57 std::string device;
58 std::string options;
59
60 //
62
63 class SensorManager;
64 SensorManager* smgr;
65
66 protected:
67
68 bool create_trackers();
69
70 void set_pose(const OWL::Rigid &r);
71 void report_marker(vrpn_int32 sensor, const OWL::Marker &m);
72 void report_rigid(vrpn_int32 sensor, const OWL::Rigid &r, bool is_stylus=false);
73 void report_button(vrpn_int32 sensor, int value);
74 void report_button_analog(vrpn_int32 sensor, int value);
75
76};
77
78#endif //VRPN_INCLUDE_PHASESPACE
79#endif //VRPN_TRACKER_PHASESPACE_H
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
All button servers should derive from this class, which provides the ability to turn any of the butto...
Definition vrpn_Button.h:66
Analog server that can scale and clip its range to -1..1.
Generic connection class not specific to the transport mechanism.
vrpn_Tracker_PhaseSpace(const char *name, vrpn_Connection *c, const char *device, float frequency, int readflag, int slaveflag=0)
This structure is what is passed to a vrpn_Connection message callback.
#define VRPN_API
#define VRPN_CALLBACK