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=========================================================================*/
48#ifndef vtkRenderWindowInteractor_h
49#define vtkRenderWindowInteractor_h
50
51#include "vtkCommand.h" // for method sig
52#include "vtkObject.h"
53#include "vtkRenderingCoreModule.h" // For export macro
54#include "vtkSmartPointer.h" // For InteractorStyle
55
56class vtkTimerIdMap;
57
58// Timer flags for win32/X compatibility
59#define VTKI_TIMER_FIRST 0
60#define VTKI_TIMER_UPDATE 1
61
62// maximum pointers active at once
63// for example in multitouch
64#define VTKI_MAX_POINTERS 5
65
68class vtkAssemblyPath;
71class vtkRenderWindow;
72class vtkRenderer;
76
77class VTKRENDERINGCORE_EXPORT vtkRenderWindowInteractor : public vtkObject
78{
79
81
82public:
85 void PrintSelf(ostream& os, vtkIndent indent) override;
86
88
95 virtual void Initialize();
97 {
98 this->Initialized = 0;
99 this->Enabled = 0;
100 this->Initialize();
101 }
103
108 void UnRegister(vtkObjectBase* o) override;
109
115 virtual void Start();
116
122 virtual void ProcessEvents() {}
123
127 vtkGetMacro(Done, bool);
128 vtkSetMacro(Done, bool);
129
139 virtual void Enable()
140 {
141 this->Enabled = 1;
142 this->Modified();
143 }
144 virtual void Disable()
145 {
146 this->Enabled = 0;
147 this->Modified();
148 }
149 vtkGetMacro(Enabled, int);
150
152
156 vtkBooleanMacro(EnableRender, bool);
157 vtkSetMacro(EnableRender, bool);
158 vtkGetMacro(EnableRender, bool);
160
162
166 vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
168
170
176 vtkGetObjectMacro(HardwareWindow, vtkHardwareWindow);
178
186 virtual void UpdateSize(int x, int y);
187
204 virtual int CreateTimer(int timerType); // first group, for backward compatibility
205 virtual int DestroyTimer(); // first group, for backward compatibility
206
211 int CreateRepeatingTimer(unsigned long duration);
212
217 int CreateOneShotTimer(unsigned long duration);
218
223 int IsOneShotTimer(int timerId);
224
228 unsigned long GetTimerDuration(int timerId);
229
233 int ResetTimer(int timerId);
234
239 int DestroyTimer(int timerId);
240
244 virtual int GetVTKTimerId(int platformTimerId);
245
246 // Moved into the public section of the class so that classless timer procs
247 // can access these enum members without being "friends"...
248 enum
249 {
250 OneShotTimer = 1,
251 RepeatingTimer
252 };
253
255
264 vtkSetClampMacro(TimerDuration, unsigned long, 1, 100000);
265 vtkGetMacro(TimerDuration, unsigned long);
267
269
281 vtkSetMacro(TimerEventId, int);
282 vtkGetMacro(TimerEventId, int);
283 vtkSetMacro(TimerEventType, int);
284 vtkGetMacro(TimerEventType, int);
285 vtkSetMacro(TimerEventDuration, int);
286 vtkGetMacro(TimerEventDuration, int);
287 vtkSetMacro(TimerEventPlatformId, int);
288 vtkGetMacro(TimerEventPlatformId, int);
290
296 virtual void TerminateApp(void) { this->Done = true; }
297
299
306
308
312 vtkSetMacro(LightFollowCamera, vtkTypeBool);
313 vtkGetMacro(LightFollowCamera, vtkTypeBool);
314 vtkBooleanMacro(LightFollowCamera, vtkTypeBool);
316
318
325 vtkSetClampMacro(DesiredUpdateRate, double, 0.0001, VTK_FLOAT_MAX);
326 vtkGetMacro(DesiredUpdateRate, double);
328
330
335 vtkSetClampMacro(StillUpdateRate, double, 0.0001, VTK_FLOAT_MAX);
336 vtkGetMacro(StillUpdateRate, double);
338
340
344 vtkGetMacro(Initialized, int);
346
348
355 vtkGetObjectMacro(Picker, vtkAbstractPicker);
357
363
365
371 vtkGetObjectMacro(PickingManager, vtkPickingManager);
373
375
379 virtual void ExitCallback();
380 virtual void UserCallback();
381 virtual void StartPickCallback();
382 virtual void EndPickCallback();
384
388 virtual void GetMousePosition(int* x, int* y)
389 {
390 *x = 0;
391 *y = 0;
392 }
393
395
402
407 virtual void Render();
408
410
415 void FlyTo(vtkRenderer* ren, double x, double y, double z);
416 void FlyTo(vtkRenderer* ren, double* x) { this->FlyTo(ren, x[0], x[1], x[2]); }
417 void FlyToImage(vtkRenderer* ren, double x, double y);
418 void FlyToImage(vtkRenderer* ren, double* x) { this->FlyToImage(ren, x[0], x[1]); }
420
422
425 vtkSetClampMacro(NumberOfFlyFrames, int, 1, VTK_INT_MAX);
426 vtkGetMacro(NumberOfFlyFrames, int);
428
430
434 vtkSetMacro(Dolly, double);
435 vtkGetMacro(Dolly, double);
437
439
447 vtkGetVector2Macro(EventPosition, int);
448 vtkGetVector2Macro(LastEventPosition, int);
449 vtkSetVector2Macro(LastEventPosition, int);
450 virtual void SetEventPosition(int x, int y)
451 {
452 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting EventPosition to (" << x
453 << "," << y << ")");
454 if (this->EventPosition[0] != x || this->EventPosition[1] != y ||
455 this->LastEventPosition[0] != x || this->LastEventPosition[1] != y)
456 {
457 this->LastEventPosition[0] = this->EventPosition[0];
458 this->LastEventPosition[1] = this->EventPosition[1];
459 this->EventPosition[0] = x;
460 this->EventPosition[1] = y;
461 this->Modified();
462 }
463 }
464 virtual void SetEventPosition(int pos[2]) { this->SetEventPosition(pos[0], pos[1]); }
465 virtual void SetEventPositionFlipY(int x, int y)
466 {
467 this->SetEventPosition(x, this->Size[1] - y - 1);
468 }
469 virtual void SetEventPositionFlipY(int pos[2]) { this->SetEventPositionFlipY(pos[0], pos[1]); }
471
472 virtual int* GetEventPositions(int pointerIndex)
473 {
474 if (pointerIndex >= VTKI_MAX_POINTERS)
475 {
476 return nullptr;
477 }
478 return this->EventPositions[pointerIndex];
479 }
480 virtual int* GetLastEventPositions(int pointerIndex)
481 {
482 if (pointerIndex >= VTKI_MAX_POINTERS)
483 {
484 return nullptr;
485 }
486 return this->LastEventPositions[pointerIndex];
487 }
488 virtual void SetEventPosition(int x, int y, int pointerIndex)
489 {
490 if (pointerIndex < 0 || pointerIndex >= VTKI_MAX_POINTERS)
491 {
492 return;
493 }
494 if (pointerIndex == 0)
495 {
496 this->LastEventPosition[0] = this->EventPosition[0];
497 this->LastEventPosition[1] = this->EventPosition[1];
498 this->EventPosition[0] = x;
499 this->EventPosition[1] = y;
500 }
501 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting EventPosition to (" << x
502 << "," << y << ") for pointerIndex number " << pointerIndex);
503 if (this->EventPositions[pointerIndex][0] != x || this->EventPositions[pointerIndex][1] != y ||
504 this->LastEventPositions[pointerIndex][0] != x ||
505 this->LastEventPositions[pointerIndex][1] != y)
506 {
507 this->LastEventPositions[pointerIndex][0] = this->EventPositions[pointerIndex][0];
508 this->LastEventPositions[pointerIndex][1] = this->EventPositions[pointerIndex][1];
509 this->EventPositions[pointerIndex][0] = x;
510 this->EventPositions[pointerIndex][1] = y;
511 this->Modified();
512 }
513 }
514 virtual void SetEventPosition(int pos[2], int pointerIndex)
515 {
516 this->SetEventPosition(pos[0], pos[1], pointerIndex);
517 }
518 virtual void SetEventPositionFlipY(int x, int y, int pointerIndex)
519 {
520 this->SetEventPosition(x, this->Size[1] - y - 1, pointerIndex);
521 }
522 virtual void SetEventPositionFlipY(int pos[2], int pointerIndex)
523 {
524 this->SetEventPositionFlipY(pos[0], pos[1], pointerIndex);
525 }
526
528
531 vtkSetMacro(AltKey, int);
532 vtkGetMacro(AltKey, int);
534
536
539 vtkSetMacro(ControlKey, int);
540 vtkGetMacro(ControlKey, int);
542
544
547 vtkSetMacro(ShiftKey, int);
548 vtkGetMacro(ShiftKey, int);
550
552
555 vtkSetMacro(KeyCode, char);
556 vtkGetMacro(KeyCode, char);
558
560
564 vtkSetMacro(RepeatCount, int);
565 vtkGetMacro(RepeatCount, int);
567
569
575 vtkSetStringMacro(KeySym);
576 vtkGetStringMacro(KeySym);
578
580
583 vtkSetMacro(PointerIndex, int);
584 vtkGetMacro(PointerIndex, int);
586
588
591 void SetRotation(double rotation);
592 vtkGetMacro(Rotation, double);
593 vtkGetMacro(LastRotation, double);
595
597
600 void SetScale(double scale);
601 vtkGetMacro(Scale, double);
602 vtkGetMacro(LastScale, double);
604
606
609 void SetTranslation(double val[2]);
610 vtkGetVector2Macro(Translation, double);
611 vtkGetVector2Macro(LastTranslation, double);
613
615
618 void SetEventInformation(int x, int y, int ctrl, int shift, char keycode, int repeatcount,
619 const char* keysym, int pointerIndex)
620 {
621 this->SetEventPosition(x, y, pointerIndex);
622 this->ControlKey = ctrl;
623 this->ShiftKey = shift;
624 this->KeyCode = keycode;
625 this->RepeatCount = repeatcount;
626 this->PointerIndex = pointerIndex;
627 if (keysym)
628 {
629 this->SetKeySym(keysym);
630 }
631 this->Modified();
632 }
633 void SetEventInformation(int x, int y, int ctrl = 0, int shift = 0, char keycode = 0,
634 int repeatcount = 0, const char* keysym = nullptr)
635 {
636 this->SetEventInformation(x, y, ctrl, shift, keycode, repeatcount, keysym, 0);
637 }
639
641
645 void SetEventInformationFlipY(int x, int y, int ctrl, int shift, char keycode, int repeatcount,
646 const char* keysym, int pointerIndex)
647 {
648 this->SetEventInformation(
649 x, this->Size[1] - y - 1, ctrl, shift, keycode, repeatcount, keysym, pointerIndex);
650 }
651 void SetEventInformationFlipY(int x, int y, int ctrl = 0, int shift = 0, char keycode = 0,
652 int repeatcount = 0, const char* keysym = nullptr)
653 {
654 this->SetEventInformationFlipY(x, y, ctrl, shift, keycode, repeatcount, keysym, 0);
655 }
657
659
662 void SetKeyEventInformation(int ctrl = 0, int shift = 0, char keycode = 0, int repeatcount = 0,
663 const char* keysym = nullptr)
664 {
665 this->ControlKey = ctrl;
666 this->ShiftKey = shift;
667 this->KeyCode = keycode;
668 this->RepeatCount = repeatcount;
669 if (keysym)
670 {
671 this->SetKeySym(keysym);
672 }
673 this->Modified();
674 }
676
678
689 vtkSetVector2Macro(Size, int);
690 vtkGetVector2Macro(Size, int);
691 vtkSetVector2Macro(EventSize, int);
692 vtkGetVector2Macro(EventSize, int);
694
700 virtual vtkRenderer* FindPokedRenderer(int, int);
701
710
712
720 vtkSetMacro(UseTDx, bool);
721 vtkGetMacro(UseTDx, bool);
723
725
730 virtual void MouseMoveEvent();
731 virtual void RightButtonPressEvent();
733 virtual void LeftButtonPressEvent();
739 virtual void MouseWheelLeftEvent();
740 virtual void MouseWheelRightEvent();
741 virtual void ExposeEvent();
742 virtual void ConfigureEvent();
743 virtual void EnterEvent();
744 virtual void LeaveEvent();
745 virtual void KeyPressEvent();
746 virtual void KeyReleaseEvent();
747 virtual void CharEvent();
748 virtual void ExitEvent();
751 virtual void FifthButtonPressEvent();
754
756
760 virtual void StartPinchEvent();
761 virtual void PinchEvent();
762 virtual void EndPinchEvent();
763 virtual void StartRotateEvent();
764 virtual void RotateEvent();
765 virtual void EndRotateEvent();
766 virtual void StartPanEvent();
767 virtual void PanEvent();
768 virtual void EndPanEvent();
769 virtual void TapEvent();
770 virtual void LongTapEvent();
771 virtual void SwipeEvent();
773
775
781 vtkSetMacro(RecognizeGestures, bool);
782 vtkGetMacro(RecognizeGestures, bool);
784
786
791 vtkGetMacro(PointersDownCount, int);
793
795
802 void ClearContact(size_t contactID);
803 int GetPointerIndexForContact(size_t contactID);
805 bool IsPointerIndexSet(int i);
806 void ClearPointerIndex(int i);
808
809protected:
812
816
817 // Used as a helper object to pick instances of vtkProp
820
821 bool Done; // is the event loop done running
822
828
832 int Style;
837
838 // Event information
843 double Rotation;
845 double Scale;
846 double LastScale;
847 double Translation[2];
848 double LastTranslation[2];
850 char* KeySym;
851 int EventPosition[2];
852 int LastEventPosition[2];
853 int EventSize[2];
854 int Size[2];
859
860 int EventPositions[VTKI_MAX_POINTERS][2];
861 int LastEventPositions[VTKI_MAX_POINTERS][2];
863
864 size_t PointerIndexLookup[VTKI_MAX_POINTERS];
865
866 // control the fly to
868 double Dolly;
869
879 void GrabFocus(vtkCommand* mouseEvents, vtkCommand* keypressEvents = nullptr)
880 {
881 this->Superclass::InternalGrabFocus(mouseEvents, keypressEvents);
882 }
883 void ReleaseFocus() { this->Superclass::InternalReleaseFocus(); }
884
889
890 // Timer related members
891 friend struct vtkTimerStruct;
892 vtkTimerIdMap* TimerMap; // An internal, PIMPLd map of timers and associated attributes
893 unsigned long TimerDuration; // in milliseconds
895
901 virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
902 virtual int InternalDestroyTimer(int platformTimerId);
905
906 // Force the interactor to handle the Start() event loop, ignoring any
907 // overrides. (Overrides are registered by observing StartEvent on the
908 // interactor.)
910
914 virtual void StartEventLoop() {}
915
916 bool UseTDx; // 3DConnexion device.
917
918 // when recognizing gestures VTK will take multitouch events
919 // if it receives them and convert them to gestures
922 int PointersDown[VTKI_MAX_POINTERS];
924 int StartingEventPositions[VTKI_MAX_POINTERS][2];
926
927private:
929 void operator=(const vtkRenderWindowInteractor&) = delete;
930};
931
932#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:34
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:57
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:67
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