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=========================================================================*/
63#ifndef vtkRenderWindowInteractor_h
64#define vtkRenderWindowInteractor_h
65
66#include "vtkCommand.h" // for method sig
67#include "vtkObject.h"
68#include "vtkRenderingCoreModule.h" // For export macro
69#include "vtkSmartPointer.h" // For InteractorStyle
70
71class vtkTimerIdMap;
72
73// Timer flags for win32/X compatibility
74#define VTKI_TIMER_FIRST 0
75#define VTKI_TIMER_UPDATE 1
76
77// maximum pointers active at once
78// for example in multitouch
79#define VTKI_MAX_POINTERS 5
80
83class vtkAssemblyPath;
86class vtkRenderWindow;
87class vtkRenderer;
91
92class VTKRENDERINGCORE_EXPORT vtkRenderWindowInteractor : public vtkObject
93{
94
96
97public:
100 void PrintSelf(ostream& os, vtkIndent indent) override;
101
103
110 virtual void Initialize();
112 {
113 this->Initialized = 0;
114 this->Enabled = 0;
115 this->Initialize();
116 }
118
123 void UnRegister(vtkObjectBase* o) override;
124
130 virtual void Start();
131
137 virtual void ProcessEvents() {}
138
142 vtkGetMacro(Done, bool);
143 vtkSetMacro(Done, bool);
144
154 virtual void Enable()
155 {
156 this->Enabled = 1;
157 this->Modified();
158 }
159 virtual void Disable()
160 {
161 this->Enabled = 0;
162 this->Modified();
163 }
164 vtkGetMacro(Enabled, int);
165
167
171 vtkBooleanMacro(EnableRender, bool);
172 vtkSetMacro(EnableRender, bool);
173 vtkGetMacro(EnableRender, bool);
175
177
181 vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
183
185
191 vtkGetObjectMacro(HardwareWindow, vtkHardwareWindow);
193
201 virtual void UpdateSize(int x, int y);
202
219 virtual int CreateTimer(int timerType); // first group, for backward compatibility
220 virtual int DestroyTimer(); // first group, for backward compatibility
221
226 int CreateRepeatingTimer(unsigned long duration);
227
232 int CreateOneShotTimer(unsigned long duration);
233
238 int IsOneShotTimer(int timerId);
239
243 unsigned long GetTimerDuration(int timerId);
244
248 int ResetTimer(int timerId);
249
254 int DestroyTimer(int timerId);
255
259 virtual int GetVTKTimerId(int platformTimerId);
260
261 // Moved into the public section of the class so that classless timer procs
262 // can access these enum members without being "friends"...
263 enum
264 {
265 OneShotTimer = 1,
266 RepeatingTimer
267 };
268
270
279 vtkSetClampMacro(TimerDuration, unsigned long, 1, 100000);
280 vtkGetMacro(TimerDuration, unsigned long);
282
284
296 vtkSetMacro(TimerEventId, int);
297 vtkGetMacro(TimerEventId, int);
298 vtkSetMacro(TimerEventType, int);
299 vtkGetMacro(TimerEventType, int);
300 vtkSetMacro(TimerEventDuration, int);
301 vtkGetMacro(TimerEventDuration, int);
302 vtkSetMacro(TimerEventPlatformId, int);
303 vtkGetMacro(TimerEventPlatformId, int);
305
311 virtual void TerminateApp(void) { this->Done = true; }
312
314
321
323
327 vtkSetMacro(LightFollowCamera, vtkTypeBool);
328 vtkGetMacro(LightFollowCamera, vtkTypeBool);
329 vtkBooleanMacro(LightFollowCamera, vtkTypeBool);
331
333
340 vtkSetClampMacro(DesiredUpdateRate, double, 0.0001, VTK_FLOAT_MAX);
341 vtkGetMacro(DesiredUpdateRate, double);
343
345
350 vtkSetClampMacro(StillUpdateRate, double, 0.0001, VTK_FLOAT_MAX);
351 vtkGetMacro(StillUpdateRate, double);
353
355
359 vtkGetMacro(Initialized, int);
361
363
370 vtkGetObjectMacro(Picker, vtkAbstractPicker);
372
378
380
386 vtkGetObjectMacro(PickingManager, vtkPickingManager);
388
390
394 virtual void ExitCallback();
395 virtual void UserCallback();
396 virtual void StartPickCallback();
397 virtual void EndPickCallback();
399
403 virtual void GetMousePosition(int* x, int* y)
404 {
405 *x = 0;
406 *y = 0;
407 }
408
410
417
422 virtual void Render();
423
425
430 void FlyTo(vtkRenderer* ren, double x, double y, double z);
431 void FlyTo(vtkRenderer* ren, double* x) { this->FlyTo(ren, x[0], x[1], x[2]); }
432 void FlyToImage(vtkRenderer* ren, double x, double y);
433 void FlyToImage(vtkRenderer* ren, double* x) { this->FlyToImage(ren, x[0], x[1]); }
435
437
440 vtkSetClampMacro(NumberOfFlyFrames, int, 1, VTK_INT_MAX);
441 vtkGetMacro(NumberOfFlyFrames, int);
443
445
449 vtkSetMacro(Dolly, double);
450 vtkGetMacro(Dolly, double);
452
454
462 vtkGetVector2Macro(EventPosition, int);
463 vtkGetVector2Macro(LastEventPosition, int);
464 vtkSetVector2Macro(LastEventPosition, int);
465 virtual void SetEventPosition(int x, int y)
466 {
467 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting EventPosition to (" << x
468 << "," << y << ")");
469 if (this->EventPosition[0] != x || this->EventPosition[1] != y ||
470 this->LastEventPosition[0] != x || this->LastEventPosition[1] != y)
471 {
472 this->LastEventPosition[0] = this->EventPosition[0];
473 this->LastEventPosition[1] = this->EventPosition[1];
474 this->EventPosition[0] = x;
475 this->EventPosition[1] = y;
476 this->Modified();
477 }
478 }
479 virtual void SetEventPosition(int pos[2]) { this->SetEventPosition(pos[0], pos[1]); }
480 virtual void SetEventPositionFlipY(int x, int y)
481 {
482 this->SetEventPosition(x, this->Size[1] - y - 1);
483 }
484 virtual void SetEventPositionFlipY(int pos[2]) { this->SetEventPositionFlipY(pos[0], pos[1]); }
486
487 virtual int* GetEventPositions(int pointerIndex)
488 {
489 if (pointerIndex >= VTKI_MAX_POINTERS)
490 {
491 return nullptr;
492 }
493 return this->EventPositions[pointerIndex];
494 }
495 virtual int* GetLastEventPositions(int pointerIndex)
496 {
497 if (pointerIndex >= VTKI_MAX_POINTERS)
498 {
499 return nullptr;
500 }
501 return this->LastEventPositions[pointerIndex];
502 }
503 virtual void SetEventPosition(int x, int y, int pointerIndex)
504 {
505 if (pointerIndex < 0 || pointerIndex >= VTKI_MAX_POINTERS)
506 {
507 return;
508 }
509 if (pointerIndex == 0)
510 {
511 this->LastEventPosition[0] = this->EventPosition[0];
512 this->LastEventPosition[1] = this->EventPosition[1];
513 this->EventPosition[0] = x;
514 this->EventPosition[1] = y;
515 }
516 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting EventPosition to (" << x
517 << "," << y << ") for pointerIndex number " << pointerIndex);
518 if (this->EventPositions[pointerIndex][0] != x || this->EventPositions[pointerIndex][1] != y ||
519 this->LastEventPositions[pointerIndex][0] != x ||
520 this->LastEventPositions[pointerIndex][1] != y)
521 {
522 this->LastEventPositions[pointerIndex][0] = this->EventPositions[pointerIndex][0];
523 this->LastEventPositions[pointerIndex][1] = this->EventPositions[pointerIndex][1];
524 this->EventPositions[pointerIndex][0] = x;
525 this->EventPositions[pointerIndex][1] = y;
526 this->Modified();
527 }
528 }
529 virtual void SetEventPosition(int pos[2], int pointerIndex)
530 {
531 this->SetEventPosition(pos[0], pos[1], pointerIndex);
532 }
533 virtual void SetEventPositionFlipY(int x, int y, int pointerIndex)
534 {
535 this->SetEventPosition(x, this->Size[1] - y - 1, pointerIndex);
536 }
537 virtual void SetEventPositionFlipY(int pos[2], int pointerIndex)
538 {
539 this->SetEventPositionFlipY(pos[0], pos[1], pointerIndex);
540 }
541
543
546 vtkSetMacro(AltKey, int);
547 vtkGetMacro(AltKey, int);
549
551
554 vtkSetMacro(ControlKey, int);
555 vtkGetMacro(ControlKey, int);
557
559
562 vtkSetMacro(ShiftKey, int);
563 vtkGetMacro(ShiftKey, int);
565
567
570 vtkSetMacro(KeyCode, char);
571 vtkGetMacro(KeyCode, char);
573
575
579 vtkSetMacro(RepeatCount, int);
580 vtkGetMacro(RepeatCount, int);
582
584
590 vtkSetStringMacro(KeySym);
591 vtkGetStringMacro(KeySym);
593
595
598 vtkSetMacro(PointerIndex, int);
599 vtkGetMacro(PointerIndex, int);
601
603
606 void SetRotation(double rotation);
607 vtkGetMacro(Rotation, double);
608 vtkGetMacro(LastRotation, double);
610
612
615 void SetScale(double scale);
616 vtkGetMacro(Scale, double);
617 vtkGetMacro(LastScale, double);
619
621
624 void SetTranslation(double val[2]);
625 vtkGetVector2Macro(Translation, double);
626 vtkGetVector2Macro(LastTranslation, double);
628
630
633 void SetEventInformation(int x, int y, int ctrl, int shift, char keycode, int repeatcount,
634 const char* keysym, int pointerIndex)
635 {
636 this->SetEventPosition(x, y, pointerIndex);
637 this->ControlKey = ctrl;
638 this->ShiftKey = shift;
639 this->KeyCode = keycode;
640 this->RepeatCount = repeatcount;
641 this->PointerIndex = pointerIndex;
642 if (keysym)
643 {
644 this->SetKeySym(keysym);
645 }
646 this->Modified();
647 }
648 void SetEventInformation(int x, int y, int ctrl = 0, int shift = 0, char keycode = 0,
649 int repeatcount = 0, const char* keysym = nullptr)
650 {
651 this->SetEventInformation(x, y, ctrl, shift, keycode, repeatcount, keysym, 0);
652 }
654
656
660 void SetEventInformationFlipY(int x, int y, int ctrl, int shift, char keycode, int repeatcount,
661 const char* keysym, int pointerIndex)
662 {
663 this->SetEventInformation(
664 x, this->Size[1] - y - 1, ctrl, shift, keycode, repeatcount, keysym, pointerIndex);
665 }
666 void SetEventInformationFlipY(int x, int y, int ctrl = 0, int shift = 0, char keycode = 0,
667 int repeatcount = 0, const char* keysym = nullptr)
668 {
669 this->SetEventInformationFlipY(x, y, ctrl, shift, keycode, repeatcount, keysym, 0);
670 }
672
674
677 void SetKeyEventInformation(int ctrl = 0, int shift = 0, char keycode = 0, int repeatcount = 0,
678 const char* keysym = nullptr)
679 {
680 this->ControlKey = ctrl;
681 this->ShiftKey = shift;
682 this->KeyCode = keycode;
683 this->RepeatCount = repeatcount;
684 if (keysym)
685 {
686 this->SetKeySym(keysym);
687 }
688 this->Modified();
689 }
691
693
704 vtkSetVector2Macro(Size, int);
705 vtkGetVector2Macro(Size, int);
706 vtkSetVector2Macro(EventSize, int);
707 vtkGetVector2Macro(EventSize, int);
709
715 virtual vtkRenderer* FindPokedRenderer(int, int);
716
725
727
735 vtkSetMacro(UseTDx, bool);
736 vtkGetMacro(UseTDx, bool);
738
740
745 virtual void MouseMoveEvent();
746 virtual void RightButtonPressEvent();
748 virtual void LeftButtonPressEvent();
754 virtual void MouseWheelLeftEvent();
755 virtual void MouseWheelRightEvent();
756 virtual void ExposeEvent();
757 virtual void ConfigureEvent();
758 virtual void EnterEvent();
759 virtual void LeaveEvent();
760 virtual void KeyPressEvent();
761 virtual void KeyReleaseEvent();
762 virtual void CharEvent();
763 virtual void ExitEvent();
766 virtual void FifthButtonPressEvent();
769
771
775 virtual void StartPinchEvent();
776 virtual void PinchEvent();
777 virtual void EndPinchEvent();
778 virtual void StartRotateEvent();
779 virtual void RotateEvent();
780 virtual void EndRotateEvent();
781 virtual void StartPanEvent();
782 virtual void PanEvent();
783 virtual void EndPanEvent();
784 virtual void TapEvent();
785 virtual void LongTapEvent();
786 virtual void SwipeEvent();
788
790
796 vtkSetMacro(RecognizeGestures, bool);
797 vtkGetMacro(RecognizeGestures, bool);
799
801
806 vtkGetMacro(PointersDownCount, int);
808
810
817 void ClearContact(size_t contactID);
818 int GetPointerIndexForContact(size_t contactID);
820 bool IsPointerIndexSet(int i);
821 void ClearPointerIndex(int i);
823
824protected:
827
831
832 // Used as a helper object to pick instances of vtkProp
835
836 bool Done; // is the event loop done running
837
843
847 int Style;
852
853 // Event information
858 double Rotation;
860 double Scale;
861 double LastScale;
862 double Translation[2];
863 double LastTranslation[2];
865 char* KeySym;
866 int EventPosition[2];
867 int LastEventPosition[2];
868 int EventSize[2];
869 int Size[2];
874
875 int EventPositions[VTKI_MAX_POINTERS][2];
876 int LastEventPositions[VTKI_MAX_POINTERS][2];
878
879 size_t PointerIndexLookup[VTKI_MAX_POINTERS];
880
881 // control the fly to
883 double Dolly;
884
894 void GrabFocus(vtkCommand* mouseEvents, vtkCommand* keypressEvents = nullptr)
895 {
896 this->Superclass::InternalGrabFocus(mouseEvents, keypressEvents);
897 }
898 void ReleaseFocus() { this->Superclass::InternalReleaseFocus(); }
899
904
905 // Timer related members
906 friend struct vtkTimerStruct;
907 vtkTimerIdMap* TimerMap; // An internal, PIMPLd map of timers and associated attributes
908 unsigned long TimerDuration; // in milliseconds
910
916 virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
917 virtual int InternalDestroyTimer(int platformTimerId);
920
921 // Force the interactor to handle the Start() event loop, ignoring any
922 // overrides. (Overrides are registered by observing StartEvent on the
923 // interactor.)
925
929 virtual void StartEventLoop() {}
930
931 bool UseTDx; // 3DConnexion device.
932
933 // when recognizing gestures VTK will take multitouch events
934 // if it receives them and convert them to gestures
937 int PointersDown[VTKI_MAX_POINTERS];
939 int StartingEventPositions[VTKI_MAX_POINTERS][2];
941
942private:
944 void operator=(const vtkRenderWindowInteractor&) = delete;
945};
946
947#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:49
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
const char * GetClassName() const
Return the class name as a string.
abstract base class for most VTK objects
Definition vtkObject.h:72
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:82
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