VTK  9.1.0
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
70class vtkTimerIdMap;
71
72// Timer flags for win32/X compatibility
73#define VTKI_TIMER_FIRST 0
74#define VTKI_TIMER_UPDATE 1
75
76// maximum pointers active at once
77// for example in multitouch
78#define VTKI_MAX_POINTERS 5
79
82class vtkAssemblyPath;
85class vtkRenderWindow;
86class vtkRenderer;
90
91class VTKRENDERINGCORE_EXPORT vtkRenderWindowInteractor : public vtkObject
92{
93
95
96public:
99 void PrintSelf(ostream& os, vtkIndent indent) override;
100
102
109 virtual void Initialize();
111 {
112 this->Initialized = 0;
113 this->Enabled = 0;
114 this->Initialize();
115 }
117
122 void UnRegister(vtkObjectBase* o) override;
123
129 virtual void Start();
130
136 virtual void ProcessEvents() {}
137
141 vtkGetMacro(Done, bool);
142 vtkSetMacro(Done, bool);
143
153 virtual void Enable()
154 {
155 this->Enabled = 1;
156 this->Modified();
157 }
158 virtual void Disable()
159 {
160 this->Enabled = 0;
161 this->Modified();
162 }
163 vtkGetMacro(Enabled, int);
164
166
170 vtkBooleanMacro(EnableRender, bool);
171 vtkSetMacro(EnableRender, bool);
172 vtkGetMacro(EnableRender, bool);
174
176
180 vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
182
184
190 vtkGetObjectMacro(HardwareWindow, vtkHardwareWindow);
192
200 virtual void UpdateSize(int x, int y);
201
218 virtual int CreateTimer(int timerType); // first group, for backward compatibility
219 virtual int DestroyTimer(); // first group, for backward compatibility
220
225 int CreateRepeatingTimer(unsigned long duration);
226
231 int CreateOneShotTimer(unsigned long duration);
232
237 int IsOneShotTimer(int timerId);
238
242 unsigned long GetTimerDuration(int timerId);
243
247 int ResetTimer(int timerId);
248
253 int DestroyTimer(int timerId);
254
258 virtual int GetVTKTimerId(int platformTimerId);
259
260 // Moved into the public section of the class so that classless timer procs
261 // can access these enum members without being "friends"...
262 enum
263 {
264 OneShotTimer = 1,
265 RepeatingTimer
266 };
267
269
278 vtkSetClampMacro(TimerDuration, unsigned long, 1, 100000);
279 vtkGetMacro(TimerDuration, unsigned long);
281
283
295 vtkSetMacro(TimerEventId, int);
296 vtkGetMacro(TimerEventId, int);
297 vtkSetMacro(TimerEventType, int);
298 vtkGetMacro(TimerEventType, int);
299 vtkSetMacro(TimerEventDuration, int);
300 vtkGetMacro(TimerEventDuration, int);
301 vtkSetMacro(TimerEventPlatformId, int);
302 vtkGetMacro(TimerEventPlatformId, int);
304
310 virtual void TerminateApp(void) { this->Done = true; }
311
313
318 vtkGetObjectMacro(InteractorStyle, vtkInteractorObserver);
320
322
326 vtkSetMacro(LightFollowCamera, vtkTypeBool);
327 vtkGetMacro(LightFollowCamera, vtkTypeBool);
328 vtkBooleanMacro(LightFollowCamera, vtkTypeBool);
330
332
339 vtkSetClampMacro(DesiredUpdateRate, double, 0.0001, VTK_FLOAT_MAX);
340 vtkGetMacro(DesiredUpdateRate, double);
342
344
349 vtkSetClampMacro(StillUpdateRate, double, 0.0001, VTK_FLOAT_MAX);
350 vtkGetMacro(StillUpdateRate, double);
352
354
358 vtkGetMacro(Initialized, int);
360
362
369 vtkGetObjectMacro(Picker, vtkAbstractPicker);
371
377
379
385 vtkGetObjectMacro(PickingManager, vtkPickingManager);
387
389
393 virtual void ExitCallback();
394 virtual void UserCallback();
395 virtual void StartPickCallback();
396 virtual void EndPickCallback();
398
402 virtual void GetMousePosition(int* x, int* y)
403 {
404 *x = 0;
405 *y = 0;
406 }
407
409
416
421 virtual void Render();
422
424
429 void FlyTo(vtkRenderer* ren, double x, double y, double z);
430 void FlyTo(vtkRenderer* ren, double* x) { this->FlyTo(ren, x[0], x[1], x[2]); }
431 void FlyToImage(vtkRenderer* ren, double x, double y);
432 void FlyToImage(vtkRenderer* ren, double* x) { this->FlyToImage(ren, x[0], x[1]); }
434
436
439 vtkSetClampMacro(NumberOfFlyFrames, int, 1, VTK_INT_MAX);
440 vtkGetMacro(NumberOfFlyFrames, int);
442
444
448 vtkSetMacro(Dolly, double);
449 vtkGetMacro(Dolly, double);
451
453
461 vtkGetVector2Macro(EventPosition, int);
462 vtkGetVector2Macro(LastEventPosition, int);
463 vtkSetVector2Macro(LastEventPosition, int);
464 virtual void SetEventPosition(int x, int y)
465 {
466 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting EventPosition to (" << x
467 << "," << y << ")");
468 if (this->EventPosition[0] != x || this->EventPosition[1] != y ||
469 this->LastEventPosition[0] != x || this->LastEventPosition[1] != y)
470 {
471 this->LastEventPosition[0] = this->EventPosition[0];
472 this->LastEventPosition[1] = this->EventPosition[1];
473 this->EventPosition[0] = x;
474 this->EventPosition[1] = y;
475 this->Modified();
476 }
477 }
478 virtual void SetEventPosition(int pos[2]) { this->SetEventPosition(pos[0], pos[1]); }
479 virtual void SetEventPositionFlipY(int x, int y)
480 {
481 this->SetEventPosition(x, this->Size[1] - y - 1);
482 }
483 virtual void SetEventPositionFlipY(int pos[2]) { this->SetEventPositionFlipY(pos[0], pos[1]); }
485
486 virtual int* GetEventPositions(int pointerIndex)
487 {
488 if (pointerIndex >= VTKI_MAX_POINTERS)
489 {
490 return nullptr;
491 }
492 return this->EventPositions[pointerIndex];
493 }
494 virtual int* GetLastEventPositions(int pointerIndex)
495 {
496 if (pointerIndex >= VTKI_MAX_POINTERS)
497 {
498 return nullptr;
499 }
500 return this->LastEventPositions[pointerIndex];
501 }
502 virtual void SetEventPosition(int x, int y, int pointerIndex)
503 {
504 if (pointerIndex < 0 || pointerIndex >= VTKI_MAX_POINTERS)
505 {
506 return;
507 }
508 if (pointerIndex == 0)
509 {
510 this->LastEventPosition[0] = this->EventPosition[0];
511 this->LastEventPosition[1] = this->EventPosition[1];
512 this->EventPosition[0] = x;
513 this->EventPosition[1] = y;
514 }
515 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting EventPosition to (" << x
516 << "," << y << ") for pointerIndex number " << pointerIndex);
517 if (this->EventPositions[pointerIndex][0] != x || this->EventPositions[pointerIndex][1] != y ||
518 this->LastEventPositions[pointerIndex][0] != x ||
519 this->LastEventPositions[pointerIndex][1] != y)
520 {
521 this->LastEventPositions[pointerIndex][0] = this->EventPositions[pointerIndex][0];
522 this->LastEventPositions[pointerIndex][1] = this->EventPositions[pointerIndex][1];
523 this->EventPositions[pointerIndex][0] = x;
524 this->EventPositions[pointerIndex][1] = y;
525 this->Modified();
526 }
527 }
528 virtual void SetEventPosition(int pos[2], int pointerIndex)
529 {
530 this->SetEventPosition(pos[0], pos[1], pointerIndex);
531 }
532 virtual void SetEventPositionFlipY(int x, int y, int pointerIndex)
533 {
534 this->SetEventPosition(x, this->Size[1] - y - 1, pointerIndex);
535 }
536 virtual void SetEventPositionFlipY(int pos[2], int pointerIndex)
537 {
538 this->SetEventPositionFlipY(pos[0], pos[1], pointerIndex);
539 }
540
542
545 vtkSetMacro(AltKey, int);
546 vtkGetMacro(AltKey, int);
548
550
553 vtkSetMacro(ControlKey, int);
554 vtkGetMacro(ControlKey, int);
556
558
561 vtkSetMacro(ShiftKey, int);
562 vtkGetMacro(ShiftKey, int);
564
566
569 vtkSetMacro(KeyCode, char);
570 vtkGetMacro(KeyCode, char);
572
574
578 vtkSetMacro(RepeatCount, int);
579 vtkGetMacro(RepeatCount, int);
581
583
589 vtkSetStringMacro(KeySym);
590 vtkGetStringMacro(KeySym);
592
594
597 vtkSetMacro(PointerIndex, int);
598 vtkGetMacro(PointerIndex, int);
600
602
605 void SetRotation(double rotation);
606 vtkGetMacro(Rotation, double);
607 vtkGetMacro(LastRotation, double);
609
611
614 void SetScale(double scale);
615 vtkGetMacro(Scale, double);
616 vtkGetMacro(LastScale, double);
618
620
623 void SetTranslation(double val[2]);
624 vtkGetVector2Macro(Translation, double);
625 vtkGetVector2Macro(LastTranslation, double);
627
629
632 void SetEventInformation(int x, int y, int ctrl, int shift, char keycode, int repeatcount,
633 const char* keysym, int pointerIndex)
634 {
635 this->SetEventPosition(x, y, pointerIndex);
636 this->ControlKey = ctrl;
637 this->ShiftKey = shift;
638 this->KeyCode = keycode;
639 this->RepeatCount = repeatcount;
640 this->PointerIndex = pointerIndex;
641 if (keysym)
642 {
643 this->SetKeySym(keysym);
644 }
645 this->Modified();
646 }
647 void SetEventInformation(int x, int y, int ctrl = 0, int shift = 0, char keycode = 0,
648 int repeatcount = 0, const char* keysym = nullptr)
649 {
650 this->SetEventInformation(x, y, ctrl, shift, keycode, repeatcount, keysym, 0);
651 }
653
655
659 void SetEventInformationFlipY(int x, int y, int ctrl, int shift, char keycode, int repeatcount,
660 const char* keysym, int pointerIndex)
661 {
662 this->SetEventInformation(
663 x, this->Size[1] - y - 1, ctrl, shift, keycode, repeatcount, keysym, pointerIndex);
664 }
665 void SetEventInformationFlipY(int x, int y, int ctrl = 0, int shift = 0, char keycode = 0,
666 int repeatcount = 0, const char* keysym = nullptr)
667 {
668 this->SetEventInformationFlipY(x, y, ctrl, shift, keycode, repeatcount, keysym, 0);
669 }
671
673
676 void SetKeyEventInformation(int ctrl = 0, int shift = 0, char keycode = 0, int repeatcount = 0,
677 const char* keysym = nullptr)
678 {
679 this->ControlKey = ctrl;
680 this->ShiftKey = shift;
681 this->KeyCode = keycode;
682 this->RepeatCount = repeatcount;
683 if (keysym)
684 {
685 this->SetKeySym(keysym);
686 }
687 this->Modified();
688 }
690
692
703 vtkSetVector2Macro(Size, int);
704 vtkGetVector2Macro(Size, int);
705 vtkSetVector2Macro(EventSize, int);
706 vtkGetVector2Macro(EventSize, int);
708
714 virtual vtkRenderer* FindPokedRenderer(int, int);
715
724
726
734 vtkSetMacro(UseTDx, bool);
735 vtkGetMacro(UseTDx, bool);
737
739
744 virtual void MouseMoveEvent();
745 virtual void RightButtonPressEvent();
747 virtual void LeftButtonPressEvent();
753 virtual void MouseWheelLeftEvent();
754 virtual void MouseWheelRightEvent();
755 virtual void ExposeEvent();
756 virtual void ConfigureEvent();
757 virtual void EnterEvent();
758 virtual void LeaveEvent();
759 virtual void KeyPressEvent();
760 virtual void KeyReleaseEvent();
761 virtual void CharEvent();
762 virtual void ExitEvent();
765 virtual void FifthButtonPressEvent();
768
770
774 virtual void StartPinchEvent();
775 virtual void PinchEvent();
776 virtual void EndPinchEvent();
777 virtual void StartRotateEvent();
778 virtual void RotateEvent();
779 virtual void EndRotateEvent();
780 virtual void StartPanEvent();
781 virtual void PanEvent();
782 virtual void EndPanEvent();
783 virtual void TapEvent();
784 virtual void LongTapEvent();
785 virtual void SwipeEvent();
787
789
795 vtkSetMacro(RecognizeGestures, bool);
796 vtkGetMacro(RecognizeGestures, bool);
798
800
805 vtkGetMacro(PointersDownCount, int);
807
809
816 void ClearContact(size_t contactID);
817 int GetPointerIndexForContact(size_t contactID);
819 bool IsPointerIndexSet(int i);
820 void ClearPointerIndex(int i);
822
823protected:
826
830
831 // Used as a helper object to pick instances of vtkProp
834
835 bool Done; // is the event loop done running
836
842
846 int Style;
851
852 // Event information
857 double Rotation;
859 double Scale;
860 double LastScale;
861 double Translation[2];
862 double LastTranslation[2];
864 char* KeySym;
865 int EventPosition[2];
866 int LastEventPosition[2];
867 int EventSize[2];
868 int Size[2];
873
874 int EventPositions[VTKI_MAX_POINTERS][2];
875 int LastEventPositions[VTKI_MAX_POINTERS][2];
877
878 size_t PointerIndexLookup[VTKI_MAX_POINTERS];
879
880 // control the fly to
882 double Dolly;
883
893 void GrabFocus(vtkCommand* mouseEvents, vtkCommand* keypressEvents = nullptr)
894 {
895 this->Superclass::InternalGrabFocus(mouseEvents, keypressEvents);
896 }
897 void ReleaseFocus() { this->Superclass::InternalReleaseFocus(); }
898
903
904 // Timer related members
905 friend struct vtkTimerStruct;
906 vtkTimerIdMap* TimerMap; // An internal, PIMPLd map of timers and associated attributes
907 unsigned long TimerDuration; // in milliseconds
909
915 virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
916 virtual int InternalDestroyTimer(int platformTimerId);
919
920 // Force the interactor to handle the Start() event loop, ignoring any
921 // overrides. (Overrides are registered by observing StartEvent on the
922 // interactor.)
924
928 virtual void StartEventLoop() {}
929
930 bool UseTDx; // 3DConnexion device.
931
932 // when recognizing gestures VTK will take multitouch events
933 // if it receives them and convert them to gestures
936 int PointersDown[VTKI_MAX_POINTERS];
938 int StartingEventPositions[VTKI_MAX_POINTERS][2];
940
941private:
943 void operator=(const vtkRenderWindowInteractor&) = delete;
944};
945
946#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:394
create a window for renderers to draw into
a simple class to control print indentation
Definition: vtkIndent.h:43
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:79
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 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.
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.
vtkInteractorObserver * InteractorStyle
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
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