RflySimSDK v3.05
RflySimSDK说明文档
载入中...
搜索中...
未找到
vrpn_3DMicroscribe.h
1#ifndef VRPN_3DMICROSCRIBE_H
2#define VRPN_3DMICROSCRIBE_H
3
4#include "vrpn_Button.h" // for vrpn_Button_Filter
5#include "vrpn_Configure.h" // for VRPN_API
6#include "vrpn_Connection.h" // for vrpn_CONNECTION_LOW_LATENCY, etc
7#include "vrpn_Shared.h" // for timeval
8#include "vrpn_Tracker.h" // for vrpn_Tracker
9#include "vrpn_Types.h" // for vrpn_uint32
10
11class VRPN_API vrpn_3DMicroscribe: public vrpn_Tracker
12 ,public vrpn_Button_Filter
13{
14 public:
15 // Offset is in meters. Scale is an abomination and should not be
16 // used. All tracker reports should be in meters in VRPN.
17 vrpn_3DMicroscribe (const char * name, vrpn_Connection * c,
18 const char * Port, long int BaudRate,
19 float OffsetX = 0.0f, float OffsetY = 0.0f, float OffsetZ = 0.0f,
20 float Scale=1.0f);
21
23
25 virtual void mainloop ();
26
27 virtual int reset(void);
28
29 protected:
30 float m_OffSet[3];
31 float m_Scale;
33 long int m_BaudRate;
34
35
37 unsigned char buf[512];
38 int bufpos;
39 struct timeval timestamp;
40
41 void ConvertOriToQuat(float ori[3]); //< directly put the values in the quat for message sending
42 virtual void clear_values(void);
43
46 virtual int get_report(void);
47
49 virtual void report_changes (vrpn_uint32 class_of_service
50 = vrpn_CONNECTION_LOW_LATENCY);
51
53 virtual void report (vrpn_uint32 class_of_service
54 = vrpn_CONNECTION_LOW_LATENCY);
55
56 // NOTE: class_of_service is only applied to vrpn_Tracker
57 // values, not vrpn_Button, which are always vrpn_RELIABLE
58};
59
60#endif
定义 vrpn_3DMicroscribe.h:13
virtual int get_report(void)
report received, 0 otherwise. Sets status to current mode.
virtual void clear_values(void)
Set all buttons, analogs and encoders back to 0
virtual void mainloop()
Called once through each main loop iteration to handle updates.
int m_PortNumber
port number
定义 vrpn_3DMicroscribe.h:32
virtual int reset(void)
Set device back to starting config
int bufpos
Current char pos in buffer
定义 vrpn_3DMicroscribe.h:38
long int m_BaudRate
baud rate
定义 vrpn_3DMicroscribe.h:33
virtual void report(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY)
send report whether or not changed
int _numbuttons
How many buttons to open
定义 vrpn_3DMicroscribe.h:36
virtual void report_changes(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY)
send report if changed
定义 vrpn_Button.h:66
Generic connection class not specific to the transport mechanism.
定义 vrpn_Connection.h:562
定义 vrpn_Tracker.h:49