11#ifndef VRPN_TRACKER_DTRACK_H
12#define VRPN_TRACKER_DTRACK_H
55#define vrpn_DTRACK_FLYSTICK_MAX_BUTTON 16
56#define vrpn_DTRACK_FLYSTICK_MAX_JOYSTICK 8
99 int dtrackPort,
float timeToReachJoy = 0.f,
100 int fixNbody = -1,
int fixNflystick = -1,
int* fixId = NULL,
101 bool act3DOFout =
false,
bool actTracing =
false);
116 struct timeval tim_first;
117 struct timeval tim_last;
120 unsigned int tracing_frames;
124 bool use_fix_numbering;
129 std::vector<int> fix_idbody;
130 std::vector<int> fix_idflystick;
132 bool warning_nbodycal;
137 std::vector<bool> joy_simulate;
138 std::vector<float> joy_last;
141 int dtrack2vrpn_marker(
int id,
const char* str_dtrack,
int id_dtrack,
142 const float* loc,
struct timeval
timestamp);
143 int dtrack2vrpn_body(
int id,
const char* str_dtrack,
int id_dtrack,
144 const float* loc,
const float* rot,
struct timeval
timestamp);
145 int dtrack2vrpn_flystickbuttons(
int id,
int id_dtrack,
146 int num_but,
const int* but,
struct timeval
timestamp);
147 int dtrack2vrpn_flystickanalogs(
int id,
int id_dtrack,
148 int num_ana,
const float* ana,
float dt,
struct timeval
timestamp);
159 unsigned int act_framecounter;
160 double act_timestamp;
162 bool output_3dof_marker;
164 std::vector<vrpn_dtrack_marker_type> act_marker;
167 std::vector<vrpn_dtrack_body_type> act_body;
168 bool act_has_bodycal_format;
171 int act_num_flystick;
172 std::vector<vrpn_dtrack_flystick_type> act_flystick;
173 bool act_has_old_flystick_format;
177 bool dtrack_init(
int udpport);
178 bool dtrack_exit(
void);
180 bool dtrack_receive(
void);
vrpn_Analog(const char *name, vrpn_Connection *c=NULL)
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
Generic connection class not specific to the transport mechanism.
vrpn_Tracker_DTrack(const char *name, vrpn_Connection *c, int dtrackPort, float timeToReachJoy=0.f, int fixNbody=-1, int fixNflystick=-1, int *fixId=NULL, bool act3DOFout=false, bool actTracing=false)
vrpn_Tracker(const char *name, vrpn_Connection *c=NULL, const char *tracker_cfg_file_name=NULL)
int button[vrpn_DTRACK_FLYSTICK_MAX_BUTTON]
float joystick[vrpn_DTRACK_FLYSTICK_MAX_JOYSTICK]
#define vrpn_DTRACK_FLYSTICK_MAX_BUTTON
#define vrpn_DTRACK_FLYSTICK_MAX_JOYSTICK
class VRPN_API vrpn_Connection