-
Notifications
You must be signed in to change notification settings - Fork 4
/
vtkVRPNButton.h
83 lines (59 loc) · 2.16 KB
/
vtkVRPNButton.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*=========================================================================
Name: vtkVRPNButton.h
Author: David Borland, The Renaissance Computing Institute (RENCI)
Copyright: The Renaissance Computing Institute (RENCI)
License: Licensed under the RENCI Open Source Software License v. 1.0.
See included License.txt or
http://www.renci.org/resources/open-source-software-license
for details.
=========================================================================*/
// .NAME vtkVRPNButton
// .SECTION Description
// vtkVRPNButton interfaces with a button device using the Virtual
// Reality Peripheral Network (VRPN:
// http://www.cs.unc.edu/Research/vrpn/).
// .SECTION see also
// vtkInteractionDeviceManager vtkDeviceInteractorStyle
#ifndef __vtkVRPNButton_h
#define __vtkVRPNButton_h
#include "vtkInteractionDeviceConfigure.h"
#include "vtkVRPNDevice.h"
class vrpn_Button_Remote;
// Holds vtkstd member variables, which must be hidden
class vtkVRPNButtonInternals;
class VTK_INTERACTIONDEVICE_EXPORT vtkVRPNButton : public vtkVRPNDevice
{
public:
static vtkVRPNButton* New();
vtkTypeRevisionMacro(vtkVRPNButton,vtkVRPNDevice);
void PrintSelf(ostream&, vtkIndent);
// Description:
// Initialize the device
virtual int Initialize();
// Description:
// Receive updates from the device
virtual void Update();
// Description:
// Invoke vrpnDevice::ButtonEvent for observers to listen for
virtual void InvokeInteractionEvent();
// Description:
// The number of buttons to use
void SetNumberOfButtons(int num);
int GetNumberOfButtons();
// Description:
// Set/Get the button information
void SetButton(int button, bool value);
bool GetButton(int button);
// Description:
// Use toggle buttons or not. Will have no effect until the device is initialized.
void SetToggle(int button, bool toggle);
protected:
vtkVRPNButton();
~vtkVRPNButton();
vrpn_Button_Remote* Button;
vtkVRPNButtonInternals* Internals;
private:
vtkVRPNButton(const vtkVRPNButton&); // Not implemented.
void operator=(const vtkVRPNButton&); // Not implemented.
};
#endif