Point Cloud Library (PCL)
1.15.1
Toggle main menu visibility
Loading...
Searching...
No Matches
pcl
visualization
vtk
vtkFixedXRenderWindowInteractor.h
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkXRenderWindowInteractor.h
5
6
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7
All rights reserved.
8
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10
This software is distributed WITHOUT ANY WARRANTY; without even
11
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
PURPOSE. See the above copyright notice for more information.
13
14
=========================================================================*/
15
/**
16
* @class vtkXRenderWindowInteractor
17
* @brief an X event driven interface for a RenderWindow
18
*
19
* vtkXRenderWindowInteractor is a convenience object that provides event
20
* bindings to common graphics functions. For example, camera and actor
21
* functions such as zoom-in/zoom-out, azimuth, roll, and pan. IT is one of
22
* the window system specific subclasses of vtkRenderWindowInteractor. Please
23
* see vtkRenderWindowInteractor documentation for event bindings.
24
*
25
* @sa
26
* vtkRenderWindowInteractor
27
*/
28
29
#ifndef vtkXRenderWindowInteractor_h
30
#define vtkXRenderWindowInteractor_h
31
32
//===========================================================
33
// now we define the C++ class
34
35
#include "vtkRenderWindowInteractor.h"
36
#include "vtkRenderingUIModule.h"
// For export macro
37
#include <X11/Xlib.h>
// Needed for X types in the public interface
38
39
namespace
pcl
{
40
class
vtkCallbackCommand;
41
class
vtkXRenderWindowInteractorInternals;
42
43
class
VTKRENDERINGUI_EXPORT
vtkXRenderWindowInteractor
:
public
vtkRenderWindowInteractor
44
{
45
public
:
46
vtkXRenderWindowInteractor
(
const
vtkXRenderWindowInteractor
&) =
delete
;
47
void
operator=
(
const
vtkXRenderWindowInteractor
&) =
delete
;
48
49
static
vtkXRenderWindowInteractor
*
New
();
50
vtkTypeMacro
(
vtkXRenderWindowInteractor
, vtkRenderWindowInteractor);
51
void
PrintSelf
(ostream& os, vtkIndent indent)
override
;
52
53
/**
54
* Initializes the event handlers without an XtAppContext. This is
55
* good for when you don't have a user interface, but you still
56
* want to have mouse interaction.
57
*/
58
void
Initialize
()
override
;
59
60
/**
61
* Break the event loop on 'q','e' keypress. Want more ???
62
*/
63
void
TerminateApp
()
override
;
64
65
/**
66
* Run the event loop and return. This is provided so that you can
67
* implement your own event loop but yet use the vtk event handling as
68
* well.
69
*/
70
void
ProcessEvents
()
override
;
71
72
///@{
73
/**
74
* Enable/Disable interactions. By default interactors are enabled when
75
* initialized. Initialize() must be called prior to enabling/disabling
76
* interaction. These methods are used when a window/widget is being
77
* shared by multiple renderers and interactors. This allows a "modal"
78
* display where one interactor is active when its data is to be displayed
79
* and all other interactors associated with the widget are disabled
80
* when their data is not displayed.
81
*/
82
void
Enable
()
override
;
83
void
Disable
()
override
;
84
///@}
85
86
/**
87
* Update the Size data member and set the associated RenderWindow's
88
* size.
89
*/
90
void
UpdateSize
(
int
,
int
)
override
;
91
92
/**
93
* Re-defines virtual function to get mouse position by querying X-server.
94
*/
95
void
GetMousePosition
(
int
* x,
int
* y)
override
;
96
97
void
DispatchEvent
(XEvent*);
98
99
protected
:
100
vtkXRenderWindowInteractor
();
101
~vtkXRenderWindowInteractor
()
override
;
102
103
/**
104
* Update the Size data member and set the associated RenderWindow's
105
* size but do not resize the XWindow.
106
*/
107
void
UpdateSizeNoXResize
(
int
,
int
);
108
109
// Using static here to avoid destroying context when many apps are open:
110
static
int
NumAppInitialized
;
111
112
Display*
DisplayId
;
113
bool
OwnDisplay
=
false
;
114
Window
WindowId
;
115
Atom
KillAtom
;
116
int
PositionBeforeStereo
[2];
117
vtkXRenderWindowInteractorInternals*
Internal
;
118
119
// Drag and drop related
120
int
XdndSourceVersion
;
121
Window
XdndSource
;
122
Atom
XdndFormatAtom
;
123
Atom
XdndURIListAtom
;
124
Atom
XdndTypeListAtom
;
125
Atom
XdndEnterAtom
;
126
Atom
XdndPositionAtom
;
127
Atom
XdndDropAtom
;
128
Atom
XdndActionCopyAtom
;
129
Atom
XdndStatusAtom
;
130
Atom
XdndFinishedAtom
;
131
132
///@{
133
/**
134
* X-specific internal timer methods. See the superclass for detailed
135
* documentation.
136
*/
137
int
InternalCreateTimer
(
int
timerId,
int
timerType,
unsigned
long
duration)
override
;
138
int
InternalDestroyTimer
(
int
platformTimerId)
override
;
139
///@}
140
141
void
FireTimers
();
142
143
/**
144
* This will start up the X event loop and never return. If you
145
* call this method it will loop processing X events until the
146
* application is exited.
147
*/
148
void
StartEventLoop
()
override
;
149
150
/**
151
* Deallocate X resource that may have been allocated
152
* Also calls finalize on the render window if available
153
*/
154
void
Finalize
();
155
156
};
157
}
// namespace pcl
158
159
#endif
pcl::vtkXRenderWindowInteractor::XdndURIListAtom
Atom XdndURIListAtom
Definition
vtkFixedXRenderWindowInteractor.h:123
pcl::vtkXRenderWindowInteractor::OwnDisplay
bool OwnDisplay
Definition
vtkFixedXRenderWindowInteractor.h:113
pcl::vtkXRenderWindowInteractor::Internal
vtkXRenderWindowInteractorInternals * Internal
Definition
vtkFixedXRenderWindowInteractor.h:117
pcl::vtkXRenderWindowInteractor::StartEventLoop
void StartEventLoop() override
This will start up the X event loop and never return.
pcl::vtkXRenderWindowInteractor::XdndEnterAtom
Atom XdndEnterAtom
Definition
vtkFixedXRenderWindowInteractor.h:125
pcl::vtkXRenderWindowInteractor::XdndPositionAtom
Atom XdndPositionAtom
Definition
vtkFixedXRenderWindowInteractor.h:126
pcl::vtkXRenderWindowInteractor::~vtkXRenderWindowInteractor
~vtkXRenderWindowInteractor() override
pcl::vtkXRenderWindowInteractor::ProcessEvents
void ProcessEvents() override
Run the event loop and return.
pcl::vtkXRenderWindowInteractor::DisplayId
Display * DisplayId
Definition
vtkFixedXRenderWindowInteractor.h:112
pcl::vtkXRenderWindowInteractor::NumAppInitialized
static int NumAppInitialized
Definition
vtkFixedXRenderWindowInteractor.h:110
pcl::vtkXRenderWindowInteractor::vtkXRenderWindowInteractor
vtkXRenderWindowInteractor(const vtkXRenderWindowInteractor &)=delete
pcl::vtkXRenderWindowInteractor::WindowId
Window WindowId
Definition
vtkFixedXRenderWindowInteractor.h:114
pcl::vtkXRenderWindowInteractor::XdndDropAtom
Atom XdndDropAtom
Definition
vtkFixedXRenderWindowInteractor.h:127
pcl::vtkXRenderWindowInteractor::InternalCreateTimer
int InternalCreateTimer(int timerId, int timerType, unsigned long duration) override
X-specific internal timer methods.
pcl::vtkXRenderWindowInteractor::XdndStatusAtom
Atom XdndStatusAtom
Definition
vtkFixedXRenderWindowInteractor.h:129
pcl::vtkXRenderWindowInteractor::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
pcl::vtkXRenderWindowInteractor::PositionBeforeStereo
int PositionBeforeStereo[2]
Definition
vtkFixedXRenderWindowInteractor.h:116
pcl::vtkXRenderWindowInteractor::Finalize
void Finalize()
Deallocate X resource that may have been allocated Also calls finalize on the render window if availa...
pcl::vtkXRenderWindowInteractor::Disable
void Disable() override
pcl::vtkXRenderWindowInteractor::TerminateApp
void TerminateApp() override
Break the event loop on 'q','e' keypress.
pcl::vtkXRenderWindowInteractor::Enable
void Enable() override
Enable/Disable interactions.
pcl::vtkXRenderWindowInteractor::FireTimers
void FireTimers()
pcl::vtkXRenderWindowInteractor::KillAtom
Atom KillAtom
Definition
vtkFixedXRenderWindowInteractor.h:115
pcl::vtkXRenderWindowInteractor::XdndTypeListAtom
Atom XdndTypeListAtom
Definition
vtkFixedXRenderWindowInteractor.h:124
pcl::vtkXRenderWindowInteractor::XdndFinishedAtom
Atom XdndFinishedAtom
Definition
vtkFixedXRenderWindowInteractor.h:130
pcl::vtkXRenderWindowInteractor::UpdateSize
void UpdateSize(int, int) override
Update the Size data member and set the associated RenderWindow's size.
pcl::vtkXRenderWindowInteractor::InternalDestroyTimer
int InternalDestroyTimer(int platformTimerId) override
pcl::vtkXRenderWindowInteractor::DispatchEvent
void DispatchEvent(XEvent *)
pcl::vtkXRenderWindowInteractor::vtkXRenderWindowInteractor
vtkXRenderWindowInteractor()
pcl::vtkXRenderWindowInteractor::operator=
void operator=(const vtkXRenderWindowInteractor &)=delete
pcl::vtkXRenderWindowInteractor::UpdateSizeNoXResize
void UpdateSizeNoXResize(int, int)
Update the Size data member and set the associated RenderWindow's size but do not resize the XWindow.
pcl::vtkXRenderWindowInteractor::XdndFormatAtom
Atom XdndFormatAtom
Definition
vtkFixedXRenderWindowInteractor.h:122
pcl::vtkXRenderWindowInteractor::New
static vtkXRenderWindowInteractor * New()
pcl::vtkXRenderWindowInteractor::XdndSource
Window XdndSource
Definition
vtkFixedXRenderWindowInteractor.h:121
pcl::vtkXRenderWindowInteractor::vtkTypeMacro
vtkTypeMacro(vtkXRenderWindowInteractor, vtkRenderWindowInteractor)
pcl::vtkXRenderWindowInteractor::GetMousePosition
void GetMousePosition(int *x, int *y) override
Re-defines virtual function to get mouse position by querying X-server.
pcl::vtkXRenderWindowInteractor::Initialize
void Initialize() override
Initializes the event handlers without an XtAppContext.
pcl::vtkXRenderWindowInteractor::XdndActionCopyAtom
Atom XdndActionCopyAtom
Definition
vtkFixedXRenderWindowInteractor.h:128
pcl::vtkXRenderWindowInteractor::XdndSourceVersion
int XdndSourceVersion
Definition
vtkFixedXRenderWindowInteractor.h:120
pcl
Definition
convolution.h:46