-
Notifications
You must be signed in to change notification settings - Fork 4
/
vtkRenciMultiTouchStyle.cxx
76 lines (58 loc) · 3.18 KB
/
vtkRenciMultiTouchStyle.cxx
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
/*=========================================================================
Name: vtkRenciMultiTouchStyle.cxx
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.
=========================================================================*/
#include "vtkRenciMultiTouchStyle.h"
#include "vtkCallbackCommand.h"
#include "vtkRenciMultiTouch.h"
vtkCxxRevisionMacro(vtkRenciMultiTouchStyle, "$Revision: 1.0 $");
//----------------------------------------------------------------------------
vtkRenciMultiTouchStyle::vtkRenciMultiTouchStyle()
{
}
//----------------------------------------------------------------------------
vtkRenciMultiTouchStyle::~vtkRenciMultiTouchStyle()
{
}
//----------------------------------------------------------------------------
void vtkRenciMultiTouchStyle::SetMultiTouch(vtkRenciMultiTouch* multiTouch)
{
if (multiTouch != NULL)
{
// Touch and drag events
multiTouch->AddObserver(vtkRenciMultiTouch::OneTouchEvent, this->DeviceCallback);
multiTouch->AddObserver(vtkRenciMultiTouch::OneDragEvent, this->DeviceCallback);
multiTouch->AddObserver(vtkRenciMultiTouch::TwoTouchEvent, this->DeviceCallback);
multiTouch->AddObserver(vtkRenciMultiTouch::TwoDragEvent, this->DeviceCallback);
multiTouch->AddObserver(vtkRenciMultiTouch::ThreeTouchEvent, this->DeviceCallback);
multiTouch->AddObserver(vtkRenciMultiTouch::ThreeDragEvent, this->DeviceCallback);
multiTouch->AddObserver(vtkRenciMultiTouch::FourTouchEvent, this->DeviceCallback);
multiTouch->AddObserver(vtkRenciMultiTouch::FourDragEvent, this->DeviceCallback);
multiTouch->AddObserver(vtkRenciMultiTouch::FiveTouchEvent, this->DeviceCallback);
multiTouch->AddObserver(vtkRenciMultiTouch::FiveDragEvent, this->DeviceCallback);
multiTouch->AddObserver(vtkRenciMultiTouch::SixTouchEvent, this->DeviceCallback);
multiTouch->AddObserver(vtkRenciMultiTouch::SixDragEvent, this->DeviceCallback);
// Zoom event
multiTouch->AddObserver(vtkRenciMultiTouch::ZoomEvent, this->DeviceCallback);
// Translate events
multiTouch->AddObserver(vtkRenciMultiTouch::TranslateYEvent, this->DeviceCallback);
multiTouch->AddObserver(vtkRenciMultiTouch::TranslateYEvent, this->DeviceCallback);
multiTouch->AddObserver(vtkRenciMultiTouch::TranslateZEvent, this->DeviceCallback);
// Rotate events
multiTouch->AddObserver(vtkRenciMultiTouch::RotateXEvent, this->DeviceCallback);
multiTouch->AddObserver(vtkRenciMultiTouch::RotateYEvent, this->DeviceCallback);
multiTouch->AddObserver(vtkRenciMultiTouch::RotateZEvent, this->DeviceCallback);
// Release event
multiTouch->AddObserver(vtkRenciMultiTouch::ReleaseEvent, this->DeviceCallback);
}
}
//----------------------------------------------------------------------------
void vtkRenciMultiTouchStyle::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
}