vrpn 07.35
Virtual Reality Peripheral Network
Loading...
Searching...
No Matches
vrpn_3DMicroscribe.h
Go to the documentation of this file.
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
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
51
53 virtual void report (vrpn_uint32 class_of_service
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
int _numbuttons
How many buttons to open.
int m_PortNumber
port number
long int m_BaudRate
baud rate
int bufpos
Current char pos in buffer.
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
virtual void report_changes(void)
Definition: vrpn_Button.C:383
Generic connection class not specific to the transport mechanism.
#define VRPN_API
const vrpn_uint32 vrpn_CONNECTION_LOW_LATENCY