VTK  9.2.6
vtkRenderWindowInteractor.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkRenderWindowInteractor.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=========================================================================*/
54#ifndef vtkRenderWindowInteractor_h
55#define vtkRenderWindowInteractor_h
56
57#include "vtkCommand.h" // for method sig
58#include "vtkObject.h"
59#include "vtkRenderingCoreModule.h" // For export macro
60#include "vtkSmartPointer.h" // For InteractorStyle
61
62class vtkTimerIdMap;
63
64// Timer flags for win32/X compatibility
65#define VTKI_TIMER_FIRST 0
66#define VTKI_TIMER_UPDATE 1
67
68// maximum pointers active at once
69// for example in multitouch
70#define VTKI_MAX_POINTERS 5
71
74class vtkAssemblyPath;
77class vtkRenderWindow;
78class vtkRenderer;
82
83class VTKRENDERINGCORE_EXPORT vtkRenderWindowInteractor : public vtkObject
84{
85
87
88public:
91 void PrintSelf(ostream& os, vtkIndent indent) override;
92
94
101 virtual void Initialize();
103 {
104 this->Initialized = 0;
105 this->Enabled = 0;
106 this->Initialize();
107 }
109
114 void UnRegister(vtkObjectBase* o) override;
115
121 virtual void Start();
122
128 virtual void ProcessEvents() {}
129
133 vtkGetMacro(Done, bool);
134 vtkSetMacro(Done, bool);
135
145 virtual void Enable()
146 {
147 this->Enabled = 1;
148 this->Modified();
149 }
150 virtual void Disable()
151 {
152 this->Enabled = 0;
153 this->Modified();
154 }
155 vtkGetMacro(Enabled, int);
156
158
162 vtkBooleanMacro(EnableRender, bool);
163 vtkSetMacro(EnableRender, bool);
164 vtkGetMacro(EnableRender, bool);
166
168
172 vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
174
176
182 vtkGetObjectMacro(HardwareWindow, vtkHardwareWindow);
184
192 virtual void UpdateSize(int x, int y);
193
210 virtual int CreateTimer(int timerType); // first group, for backward compatibility
211 virtual int DestroyTimer(); // first group, for backward compatibility
212
217 int CreateRepeatingTimer(unsigned long duration);
218
223 int CreateOneShotTimer(unsigned long duration);
224
229 int IsOneShotTimer(int timerId);
230
234 unsigned long GetTimerDuration(int timerId);
235
239 int ResetTimer(int timerId);
240
245 int DestroyTimer(int timerId);
246
250 virtual int GetVTKTimerId(int platformTimerId);
251
252 // Moved into the public section of the class so that classless timer procs
253 // can access these enum members without being "friends"...
254 enum
255 {
256 OneShotTimer = 1,
257 RepeatingTimer
258 };
259
261
270 vtkSetClampMacro(TimerDuration, unsigned long, 1, 100000);
271 vtkGetMacro(TimerDuration, unsigned long);
273
275
287 vtkSetMacro(TimerEventId, int);
288 vtkGetMacro(TimerEventId, int);
289 vtkSetMacro(TimerEventType, int);
290 vtkGetMacro(TimerEventType, int);
291 vtkSetMacro(TimerEventDuration, int);
292 vtkGetMacro(TimerEventDuration, int);
293 vtkSetMacro(TimerEventPlatformId, int);
294 vtkGetMacro(TimerEventPlatformId, int);
296
302 virtual void TerminateApp(void) { this->Done = true; }
303
305
312
314
318 vtkSetMacro(LightFollowCamera, vtkTypeBool);
319 vtkGetMacro(LightFollowCamera, vtkTypeBool);
320 vtkBooleanMacro(LightFollowCamera, vtkTypeBool);
322
324
331 vtkSetClampMacro(DesiredUpdateRate, double, 0.0001, VTK_FLOAT_MAX);
332 vtkGetMacro(DesiredUpdateRate, double);
334
336
341 vtkSetClampMacro(StillUpdateRate, double, 0.0001, VTK_FLOAT_MAX);
342 vtkGetMacro(StillUpdateRate, double);
344
346
350 vtkGetMacro(Initialized, int);
352
354
361 vtkGetObjectMacro(Picker, vtkAbstractPicker);
363
369
371
377 vtkGetObjectMacro(PickingManager, vtkPickingManager);
379
381
385 virtual void ExitCallback();
386 virtual void UserCallback();
387 virtual void StartPickCallback();
388 virtual void EndPickCallback();
390
394 virtual void GetMousePosition(int* x, int* y)
395 {
396 *x = 0;
397 *y = 0;
398 }
399
401
408
413 virtual void Render();
414
416
421 void FlyTo(vtkRenderer* ren, double x, double y, double z);
422 void FlyTo(vtkRenderer* ren, double* x) { this->FlyTo(ren, x[0], x[1], x[2]); }
423 void FlyToImage(vtkRenderer* ren, double x, double y);
424 void FlyToImage(vtkRenderer* ren, double* x) { this->FlyToImage(ren, x[0], x[1]); }
426
428
431 vtkSetClampMacro(NumberOfFlyFrames, int, 1, VTK_INT_MAX);
432 vtkGetMacro(NumberOfFlyFrames, int);
434
436
440 vtkSetMacro(Dolly, double);
441 vtkGetMacro(Dolly, double);
443
445
453 vtkGetVector2Macro(EventPosition, int);
454 vtkGetVector2Macro(LastEventPosition, int);
455 vtkSetVector2Macro(LastEventPosition, int);
456 virtual void SetEventPosition(int x, int y)
457 {
458 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting EventPosition to (" << x
459 << "," << y << ")");
460 if (this->EventPosition[0] != x || this->EventPosition[1] != y ||
461 this->LastEventPosition[0] != x || this->LastEventPosition[1] != y)
462 {
463 this->LastEventPosition[0] = this->EventPosition[0];
464 this->LastEventPosition[1] = this->EventPosition[1];
465 this->EventPosition[0] = x;
466 this->EventPosition[1] = y;
467 this->Modified();
468 }
469 }
470 virtual void SetEventPosition(int pos[2]) { this->SetEventPosition(pos[0], pos[1]); }
471 virtual void SetEventPositionFlipY(int x, int y)
472 {
473 this->SetEventPosition(x, this->Size[1] - y - 1);
474 }
475 virtual void SetEventPositionFlipY(int pos[2]) { this->SetEventPositionFlipY(pos[0], pos[1]); }
477
478 virtual int* GetEventPositions(int pointerIndex)
479 {
480 if (pointerIndex >= VTKI_MAX_POINTERS)
481 {
482 return nullptr;
483 }
484 return this->EventPositions[pointerIndex];
485 }
486 virtual int* GetLastEventPositions(int pointerIndex)
487 {
488 if (pointerIndex >= VTKI_MAX_POINTERS)
489 {
490 return nullptr;
491 }
492 return this->LastEventPositions[pointerIndex];
493 }
494 virtual void SetEventPosition(int x, int y, int pointerIndex)
495 {
496 if (pointerIndex < 0 || pointerIndex >= VTKI_MAX_POINTERS)
497 {
498 return;
499 }
500 if (pointerIndex == 0)
501 {
502 this->LastEventPosition[0] = this->EventPosition[0];
503 this->LastEventPosition[1] = this->EventPosition[1];
504 this->EventPosition[0] = x;
505 this->EventPosition[1] = y;
506 }
507 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting EventPosition to (" << x
508 << "," << y << ") for pointerIndex number " << pointerIndex);
509 if (this->EventPositions[pointerIndex][0] != x || this->EventPositions[pointerIndex][1] != y ||
510 this->LastEventPositions[pointerIndex][0] != x ||
511 this->LastEventPositions[pointerIndex][1] != y)
512 {
513 this->LastEventPositions[pointerIndex][0] = this->EventPositions[pointerIndex][0];
514 this->LastEventPositions[pointerIndex][1] = this->EventPositions[pointerIndex][1];
515 this->EventPositions[pointerIndex][0] = x;
516 this->EventPositions[pointerIndex][1] = y;
517 this->Modified();
518 }
519 }
520 virtual void SetEventPosition(int pos[2], int pointerIndex)
521 {
522 this->SetEventPosition(pos[0], pos[1], pointerIndex);
523 }
524 virtual void SetEventPositionFlipY(int x, int y, int pointerIndex)
525 {
526 this->SetEventPosition(x, this->Size[1] - y - 1, pointerIndex);
527 }
528 virtual void SetEventPositionFlipY(int pos[2], int pointerIndex)
529 {
530 this->SetEventPositionFlipY(pos[0], pos[1], pointerIndex);
531 }
532
534
537 vtkSetMacro(AltKey, int);
538 vtkGetMacro(AltKey, int);
540
542
545 vtkSetMacro(ControlKey, int);
546 vtkGetMacro(ControlKey, int);
548
550
553 vtkSetMacro(ShiftKey, int);
554 vtkGetMacro(ShiftKey, int);
556
558
561 vtkSetMacro(KeyCode, char);
562 vtkGetMacro(KeyCode, char);
564
566
570 vtkSetMacro(RepeatCount, int);
571 vtkGetMacro(RepeatCount, int);
573
575
581 vtkSetStringMacro(KeySym);
582 vtkGetStringMacro(KeySym);
584
586
589 vtkSetMacro(PointerIndex, int);
590 vtkGetMacro(PointerIndex, int);
592
594
597 void SetRotation(double rotation);
598 vtkGetMacro(Rotation, double);
599 vtkGetMacro(LastRotation, double);
601
603
606 void SetScale(double scale);
607 vtkGetMacro(Scale, double);
608 vtkGetMacro(LastScale, double);
610
612
615 void SetTranslation(double val[2]);
616 vtkGetVector2Macro(Translation, double);
617 vtkGetVector2Macro(LastTranslation, double);
619
621
624 void SetEventInformation(int x, int y, int ctrl, int shift, char keycode, int repeatcount,
625 const char* keysym, int pointerIndex)
626 {
627 this->SetEventPosition(x, y, pointerIndex);
628 this->ControlKey = ctrl;
629 this->ShiftKey = shift;
630 this->KeyCode = keycode;
631 this->RepeatCount = repeatcount;
632 this->PointerIndex = pointerIndex;
633 if (keysym)
634 {
635 this->SetKeySym(keysym);
636 }
637 this->Modified();
638 }
639 void SetEventInformation(int x, int y, int ctrl = 0, int shift = 0, char keycode = 0,
640 int repeatcount = 0, const char* keysym = nullptr)
641 {
642 this->SetEventInformation(x, y, ctrl, shift, keycode, repeatcount, keysym, 0);
643 }
645
647
651 void SetEventInformationFlipY(int x, int y, int ctrl, int shift, char keycode, int repeatcount,
652 const char* keysym, int pointerIndex)
653 {
654 this->SetEventInformation(
655 x, this->Size[1] - y - 1, ctrl, shift, keycode, repeatcount, keysym, pointerIndex);
656 }
657 void SetEventInformationFlipY(int x, int y, int ctrl = 0, int shift = 0, char keycode = 0,
658 int repeatcount = 0, const char* keysym = nullptr)
659 {
660 this->SetEventInformationFlipY(x, y, ctrl, shift, keycode, repeatcount, keysym, 0);
661 }
663
665
668 void SetKeyEventInformation(int ctrl = 0, int shift = 0, char keycode = 0, int repeatcount = 0,
669 const char* keysym = nullptr)
670 {
671 this->ControlKey = ctrl;
672 this->ShiftKey = shift;
673 this->KeyCode = keycode;
674 this->RepeatCount = repeatcount;
675 if (keysym)
676 {
677 this->SetKeySym(keysym);
678 }
679 this->Modified();
680 }
682
684
695 vtkSetVector2Macro(Size, int);
696 vtkGetVector2Macro(Size, int);
697 vtkSetVector2Macro(EventSize, int);
698 vtkGetVector2Macro(EventSize, int);
700
706 virtual vtkRenderer* FindPokedRenderer(int, int);
707
716
718
726 vtkSetMacro(UseTDx, bool);
727 vtkGetMacro(UseTDx, bool);
729
731
736 virtual void MouseMoveEvent();
737 virtual void RightButtonPressEvent();
739 virtual void LeftButtonPressEvent();
745 virtual void MouseWheelLeftEvent();
746 virtual void MouseWheelRightEvent();
747 virtual void ExposeEvent();
748 virtual void ConfigureEvent();
749 virtual void EnterEvent();
750 virtual void LeaveEvent();
751 virtual void KeyPressEvent();
752 virtual void KeyReleaseEvent();
753 virtual void CharEvent();
754 virtual void ExitEvent();
757 virtual void FifthButtonPressEvent();
760
762
766 virtual void StartPinchEvent();
767 virtual void PinchEvent();
768 virtual void EndPinchEvent();
769 virtual void StartRotateEvent();
770 virtual void RotateEvent();
771 virtual void EndRotateEvent();
772 virtual void StartPanEvent();
773 virtual void PanEvent();
774 virtual void EndPanEvent();
775 virtual void TapEvent();
776 virtual void LongTapEvent();
777 virtual void SwipeEvent();
779
781
787 vtkSetMacro(RecognizeGestures, bool);
788 vtkGetMacro(RecognizeGestures, bool);
790
792
797 vtkGetMacro(PointersDownCount, int);
799
801
808 void ClearContact(size_t contactID);
809 int GetPointerIndexForContact(size_t contactID);
811 bool IsPointerIndexSet(int i);
812 void ClearPointerIndex(int i);
814
815protected:
818
822
823 // Used as a helper object to pick instances of vtkProp
826
827 bool Done; // is the event loop done running
828
834
838 int Style;
843
844 // Event information
849 double Rotation;
851 double Scale;
852 double LastScale;
853 double Translation[2];
854 double LastTranslation[2];
856 char* KeySym;
857 int EventPosition[2];
858 int LastEventPosition[2];
859 int EventSize[2];
860 int Size[2];
865
866 int EventPositions[VTKI_MAX_POINTERS][2];
867 int LastEventPositions[VTKI_MAX_POINTERS][2];
869
870 size_t PointerIndexLookup[VTKI_MAX_POINTERS];
871
872 // control the fly to
874 double Dolly;
875
885 void GrabFocus(vtkCommand* mouseEvents, vtkCommand* keypressEvents = nullptr)
886 {
887 this->Superclass::InternalGrabFocus(mouseEvents, keypressEvents);
888 }
889 void ReleaseFocus() { this->Superclass::InternalReleaseFocus(); }
890
895
896 // Timer related members
897 friend struct vtkTimerStruct;
898 vtkTimerIdMap* TimerMap; // An internal, PIMPLd map of timers and associated attributes
899 unsigned long TimerDuration; // in milliseconds
901
907 virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
908 virtual int InternalDestroyTimer(int platformTimerId);
911
912 // Force the interactor to handle the Start() event loop, ignoring any
913 // overrides. (Overrides are registered by observing StartEvent on the
914 // interactor.)
916
920 virtual void StartEventLoop() {}
921
922 bool UseTDx; // 3DConnexion device.
923
924 // when recognizing gestures VTK will take multitouch events
925 // if it receives them and convert them to gestures
928 int PointersDown[VTKI_MAX_POINTERS];
930 int StartingEventPositions[VTKI_MAX_POINTERS][2];
932
933private:
935 void operator=(const vtkRenderWindowInteractor&) = delete;
936};
937
938#endif
define API for picking subclasses
abstract API for pickers that can pick an instance of vtkProp
a list of nodes that form an assembly path
superclass for callback/observer methods
Definition: vtkCommand.h:395
create a window for renderers to draw into
a simple class to control print indentation
Definition: vtkIndent.h:40
record and play VTK events passing through a vtkRenderWindowInteractor
an abstract superclass for classes observing events invoked by vtkRenderWindowInteractor
abstract base class for most VTK objects
Definition: vtkObjectBase.h:74
const char * GetClassName() const
Return the class name as a string.
abstract base class for most VTK objects
Definition: vtkObject.h:63
virtual void Modified()
Update the modification time for this object.
manage contention for cursors and other resources
Class defines API to manage the picking process.
platform-independent render window interaction including picking and frame rate control.
unsigned long GetTimerDuration(int timerId)
Get the duration (in milliseconds) for the specified timerId.
void HideCursor()
Hide or show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to di...
virtual void StartEventLoop()
Run the event loop (does not return until TerminateApp is called).
virtual void FourthButtonReleaseEvent()
Fire various events.
virtual void PinchEvent()
Fire various gesture based events.
virtual void SwipeEvent()
Fire various gesture based events.
virtual void StartRotateEvent()
Fire various gesture based events.
void SetRenderWindow(vtkRenderWindow *aren)
Set/Get the rendering window being controlled by this object.
void SetKeyEventInformation(int ctrl=0, int shift=0, char keycode=0, int repeatcount=0, const char *keysym=nullptr)
Set all the keyboard-related event information in one call.
void UnRegister(vtkObjectBase *o) override
This Method detects loops of RenderWindow-Interactor, so objects are freed properly.
virtual void SetEventPositionFlipY(int pos[2], int pointerIndex)
virtual void EndPinchEvent()
Fire various gesture based events.
virtual void KeyReleaseEvent()
Fire various events.
virtual int * GetLastEventPositions(int pointerIndex)
virtual void EndPickCallback()
These methods correspond to the Exit, User and Pick callbacks.
virtual void Enable()
Enable/Disable interactions.
virtual int InternalDestroyTimer(int platformTimerId)
Internal methods for creating and destroying timers that must be implemented by subclasses.
int CreateRepeatingTimer(unsigned long duration)
Create a repeating timer, with the specified duration (in milliseconds).
vtkObserverMediator * ObserverMediator
Widget mediators are used to resolve contention for cursors and other resources.
virtual void EndRotateEvent()
Fire various gesture based events.
virtual void ExitEvent()
Fire various events.
void FlyToImage(vtkRenderer *ren, double x, double y)
Given a position x, move the current camera's focal point to x.
void SetRotation(double rotation)
Set/get the rotation for the gesture in degrees, update LastRotation.
virtual void ExposeEvent()
Fire various events.
virtual void EndPanEvent()
Fire various gesture based events.
virtual void Render()
Render the scene.
virtual vtkRenderer * FindPokedRenderer(int, int)
When an event occurs, we must determine which Renderer the event occurred within, since one RenderWin...
virtual vtkAbstractPropPicker * CreateDefaultPicker()
Create default picker.
virtual void MouseWheelLeftEvent()
Fire various events.
virtual void MouseWheelForwardEvent()
Fire various events.
virtual void SetEventPosition(int x, int y)
Set/Get information about the current event.
virtual void UserCallback()
These methods correspond to the Exit, User and Pick callbacks.
void SetHardwareWindow(vtkHardwareWindow *aren)
Set/Get the hardware window being controlled by this object.
virtual void LeftButtonReleaseEvent()
Fire various events.
virtual void CharEvent()
Fire various events.
virtual int DestroyTimer()
int IsOneShotTimer(int timerId)
Query whether the specified timerId is a one shot timer.
void SetEventInformation(int x, int y, int ctrl, int shift, char keycode, int repeatcount, const char *keysym, int pointerIndex)
Set all the event information in one call.
virtual void TerminateApp(void)
This function is called on 'q','e' keypress if exitmethod is not specified and should be overridden b...
vtkObserverMediator * GetObserverMediator()
Return the object used to mediate between vtkInteractorObservers contending for resources.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void UpdateSize(int x, int y)
Event loop notification member for window size change.
virtual vtkPickingManager * CreateDefaultPickingManager()
Create default pickingManager.
virtual void LeaveEvent()
Fire various events.
virtual vtkInteractorObserver * GetInteractorStyle()
External switching between joystick/trackball/new? modes.
virtual void FourthButtonPressEvent()
Fire various events.
virtual void MouseWheelRightEvent()
Fire various events.
virtual void EnterEvent()
Fire various events.
virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration)
Internal methods for creating and destroying timers that must be implemented by subclasses.
~vtkRenderWindowInteractor() override
virtual void RightButtonPressEvent()
Fire various events.
virtual void Start()
Start the event loop.
void SetEventInformation(int x, int y, int ctrl=0, int shift=0, char keycode=0, int repeatcount=0, const char *keysym=nullptr)
Set all the event information in one call.
void ShowCursor()
Hide or show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to di...
virtual void ConfigureEvent()
Fire various events.
virtual void FifthButtonPressEvent()
Fire various events.
virtual int * GetEventPositions(int pointerIndex)
virtual void StartPanEvent()
Fire various gesture based events.
virtual int CreateTimer(int timerType)
This class provides two groups of methods for manipulating timers.
int ResetTimer(int timerId)
Reset the specified timer.
int GetCurrentTimerId()
Internal methods for creating and destroying timers that must be implemented by subclasses.
virtual void MouseWheelBackwardEvent()
Fire various events.
virtual void SetInteractorStyle(vtkInteractorObserver *)
External switching between joystick/trackball/new? modes.
void ClearContact(size_t contactID)
Most multitouch systems use persistent contact/pointer ids to track events/motion during multitouch e...
void FlyTo(vtkRenderer *ren, double x, double y, double z)
Given a position x, move the current camera's focal point to x.
int CreateOneShotTimer(unsigned long duration)
Create a one shot timer, with the specified duration (in milliseconds).
void ReInitialize()
Prepare for handling events and set the Enabled flag to true.
virtual void ExitCallback()
These methods correspond to the Exit, User and Pick callbacks.
void SetEventInformationFlipY(int x, int y, int ctrl=0, int shift=0, char keycode=0, int repeatcount=0, const char *keysym=nullptr)
Calls SetEventInformation, but flips the Y based on the current Size[1] value (i.e.
int DestroyTimer(int timerId)
Destroy the timer specified by timerId.
vtkSmartPointer< vtkInteractorObserver > InteractorStyle
void SetTranslation(double val[2])
Set/get the translation for pan/swipe gestures, update LastTranslation.
void FlyToImage(vtkRenderer *ren, double *x)
Given a position x, move the current camera's focal point to x.
virtual void PanEvent()
Fire various gesture based events.
virtual void ProcessEvents()
Run the event loop and return.
virtual void RightButtonReleaseEvent()
Fire various events.
virtual void SetEventPositionFlipY(int x, int y, int pointerIndex)
void SetEventInformationFlipY(int x, int y, int ctrl, int shift, char keycode, int repeatcount, const char *keysym, int pointerIndex)
Calls SetEventInformation, but flips the Y based on the current Size[1] value (i.e.
virtual void GetMousePosition(int *x, int *y)
Get the current position of the mouse.
virtual void SetEventPositionFlipY(int x, int y)
Set/Get information about the current event.
int GetPointerIndexForContact(size_t contactID)
Most multitouch systems use persistent contact/pointer ids to track events/motion during multitouch e...
static vtkRenderWindowInteractor * New()
virtual void FifthButtonReleaseEvent()
Fire various events.
bool IsPointerIndexSet(int i)
Most multitouch systems use persistent contact/pointer ids to track events/motion during multitouch e...
virtual void LeftButtonPressEvent()
Fire various events.
void GrabFocus(vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
virtual void MiddleButtonPressEvent()
Fire various events.
virtual void StartPickCallback()
These methods correspond to the Exit, User and Pick callbacks.
int GetPointerIndexForExistingContact(size_t contactID)
Most multitouch systems use persistent contact/pointer ids to track events/motion during multitouch e...
virtual void MouseMoveEvent()
Fire various events.
void FlyTo(vtkRenderer *ren, double *x)
Given a position x, move the current camera's focal point to x.
virtual void StartPinchEvent()
Fire various gesture based events.
virtual void SetEventPosition(int pos[2])
Set/Get information about the current event.
virtual void SetPicker(vtkAbstractPicker *)
Set/Get the object used to perform pick operations.
virtual int GetVTKTimerId(int platformTimerId)
Get the VTK timer ID that corresponds to the supplied platform ID.
void SetScale(double scale)
Set/get the scale for the gesture, updates LastScale.
virtual void Initialize()
Prepare for handling events and set the Enabled flag to true.
virtual void RotateEvent()
Fire various gesture based events.
virtual void TapEvent()
Fire various gesture based events.
virtual void SetEventPositionFlipY(int pos[2])
Set/Get information about the current event.
virtual void SetEventPosition(int x, int y, int pointerIndex)
void ClearPointerIndex(int i)
Most multitouch systems use persistent contact/pointer ids to track events/motion during multitouch e...
virtual void LongTapEvent()
Fire various gesture based events.
virtual void MiddleButtonReleaseEvent()
Fire various events.
virtual void RecognizeGesture(vtkCommand::EventIds)
virtual void SetEventPosition(int pos[2], int pointerIndex)
virtual void SetPickingManager(vtkPickingManager *)
Set the picking manager.
virtual void KeyPressEvent()
Fire various events.
create a window for renderers to draw into
abstract specification for renderers
Definition: vtkRenderer.h:73
Hold a reference to a vtkObjectBase instance.
int vtkTypeBool
Definition: vtkABI.h:69
#define VTKI_MAX_POINTERS
#define VTK_INT_MAX
Definition: vtkType.h:155
#define VTK_FLOAT_MAX
Definition: vtkType.h:163